summaryrefslogtreecommitdiff
path: root/src/lib/libssl/d1_pkt.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libssl/d1_pkt.c')
-rw-r--r--src/lib/libssl/d1_pkt.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/libssl/d1_pkt.c b/src/lib/libssl/d1_pkt.c
index 11e6d7f8f8..0b952cf5f3 100644
--- a/src/lib/libssl/d1_pkt.c
+++ b/src/lib/libssl/d1_pkt.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: d1_pkt.c,v 1.110 2021/09/04 14:15:52 jsing Exp $ */ 1/* $OpenBSD: d1_pkt.c,v 1.111 2021/09/04 14:24:28 jsing Exp $ */
2/* 2/*
3 * DTLS implementation written by Nagendra Modadugu 3 * DTLS implementation written by Nagendra Modadugu
4 * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. 4 * (nagendra@cs.stanford.edu) for the OpenSSL project 2005.
@@ -807,9 +807,11 @@ dtls1_read_bytes(SSL *s, int type, unsigned char *buf, int len, int peek)
807 rr->length >= DTLS1_HM_HEADER_LENGTH && rr->off == 0 && 807 rr->length >= DTLS1_HM_HEADER_LENGTH && rr->off == 0 &&
808 !s->internal->in_handshake) { 808 !s->internal->in_handshake) {
809 struct hm_header_st msg_hdr; 809 struct hm_header_st msg_hdr;
810 CBS cbs;
810 811
811 /* this may just be a stale retransmit */ 812 /* this may just be a stale retransmit */
812 if (!dtls1_get_message_header(rr->data, &msg_hdr)) 813 CBS_init(&cbs, rr->data, rr->length);
814 if (!dtls1_get_message_header(&cbs, &msg_hdr))
813 return -1; 815 return -1;
814 if (rr->epoch != tls12_record_layer_read_epoch(s->internal->rl)) { 816 if (rr->epoch != tls12_record_layer_read_epoch(s->internal->rl)) {
815 rr->length = 0; 817 rr->length = 0;