summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortb <>2022-11-23 07:31:12 +0000
committertb <>2022-11-23 07:31:12 +0000
commitd54bf743ec5803b144b5355fbd19c0ae0a7fa2d6 (patch)
tree18366065d7a574d8d93cc9860c2e1dff366938e2
parentea977d536935fe6d2052990c391950a4ce519541 (diff)
downloadopenbsd-d54bf743ec5803b144b5355fbd19c0ae0a7fa2d6.tar.gz
openbsd-d54bf743ec5803b144b5355fbd19c0ae0a7fa2d6.tar.bz2
openbsd-d54bf743ec5803b144b5355fbd19c0ae0a7fa2d6.zip
Reverse arguments in CBS_dup()
We want to copy the tls_content_cbs() into the cbs, not the other way around CID 377013 ok jsing
-rw-r--r--src/lib/libssl/d1_pkt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libssl/d1_pkt.c b/src/lib/libssl/d1_pkt.c
index 35d5d8ec6d..4b33685aba 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.125 2022/11/11 17:15:26 jsing Exp $ */ 1/* $OpenBSD: d1_pkt.c,v 1.126 2022/11/23 07:31:12 tb 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.
@@ -553,7 +553,7 @@ dtls1_read_handshake_unexpected(SSL *s)
553 } 553 }
554 554
555 /* Parse handshake message header. */ 555 /* Parse handshake message header. */
556 CBS_dup(&cbs, tls_content_cbs(s->s3->rcontent)); 556 CBS_dup(tls_content_cbs(s->s3->rcontent), &cbs);
557 if (!dtls1_get_message_header(&cbs, &hs_msg_hdr)) 557 if (!dtls1_get_message_header(&cbs, &hs_msg_hdr))
558 return -1; /* XXX - probably should drop/continue. */ 558 return -1; /* XXX - probably should drop/continue. */
559 559