summaryrefslogtreecommitdiff
path: root/ssl/d1_pkt.c
diff options
context:
space:
mode:
authorJung-uk Kim <jkim@FreeBSD.org>2015-01-08 22:50:44 +0000
committerJung-uk Kim <jkim@FreeBSD.org>2015-01-08 22:50:44 +0000
commit1b54c06563a2a52b2b26a116ab243c40bf4d0c9f (patch)
treee1295f92dee4cb6b09a209711754a49e3c0b90b1 /ssl/d1_pkt.c
parentf62b4332f57a140c7a64082fb139c06b1a71584c (diff)
Notes
Diffstat (limited to 'ssl/d1_pkt.c')
-rw-r--r--ssl/d1_pkt.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/ssl/d1_pkt.c b/ssl/d1_pkt.c
index d12604e6573eb..bc478c240cc3f 100644
--- a/ssl/d1_pkt.c
+++ b/ssl/d1_pkt.c
@@ -595,8 +595,6 @@ again:
/* now s->packet_length == DTLS1_RT_HEADER_LENGTH */
i=rr->length;
n=ssl3_read_n(s,i,i,1);
- if (n <= 0) return(n); /* error or non-blocking io */
-
/* this packet contained a partial record, dump it */
if ( n != i)
{
@@ -626,7 +624,8 @@ again:
* would be dropped unnecessarily.
*/
if (!(s->d1->listen && rr->type == SSL3_RT_HANDSHAKE &&
- *p == SSL3_MT_CLIENT_HELLO) &&
+ s->packet_length > DTLS1_RT_HEADER_LENGTH &&
+ s->packet[DTLS1_RT_HEADER_LENGTH] == SSL3_MT_CLIENT_HELLO) &&
! dtls1_record_replay_check(s, bitmap, &(rr->seq_num)))
{
rr->length = 0;