From: tb Date: Wed, 23 Nov 2022 07:31:12 +0000 (+0000) Subject: Reverse arguments in CBS_dup() X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=ad58af2d2eed40c25b43a1973c4176784ff6226b;p=openbsd 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 --- diff --git a/lib/libssl/d1_pkt.c b/lib/libssl/d1_pkt.c index 35d5d8ec6dd..4b33685aba6 100644 --- a/lib/libssl/d1_pkt.c +++ b/lib/libssl/d1_pkt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: d1_pkt.c,v 1.125 2022/11/11 17:15:26 jsing Exp $ */ +/* $OpenBSD: d1_pkt.c,v 1.126 2022/11/23 07:31:12 tb Exp $ */ /* * DTLS implementation written by Nagendra Modadugu * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. @@ -553,7 +553,7 @@ dtls1_read_handshake_unexpected(SSL *s) } /* Parse handshake message header. */ - CBS_dup(&cbs, tls_content_cbs(s->s3->rcontent)); + CBS_dup(tls_content_cbs(s->s3->rcontent), &cbs); if (!dtls1_get_message_header(&cbs, &hs_msg_hdr)) return -1; /* XXX - probably should drop/continue. */