summaryrefslogtreecommitdiffstats
path: root/lib/libssl/src
diff options
context:
space:
mode:
authordoug <doug@openbsd.org>2015-07-19 01:07:40 +0000
committerdoug <doug@openbsd.org>2015-07-19 01:07:40 +0000
commit6c0b0411c02ef54e22f6d3c5f09e52268bc815be (patch)
treed0769fc0b4b628a7983d01f41618f48420a7a244 /lib/libssl/src
parentabort when ENGINE_remove fails, fix Coverity 21656 (diff)
downloadwireguard-openbsd-6c0b0411c02ef54e22f6d3c5f09e52268bc815be.tar.xz
wireguard-openbsd-6c0b0411c02ef54e22f6d3c5f09e52268bc815be.zip
Assign p to CBS_data since it is used later.
The p initialization was hiding this bug but Coverity 126279 saw it. ok miod@ bcook@ beck@
Diffstat (limited to 'lib/libssl/src')
-rw-r--r--lib/libssl/src/ssl/d1_pkt.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libssl/src/ssl/d1_pkt.c b/lib/libssl/src/ssl/d1_pkt.c
index b26ff2cec23..c3574b43bd7 100644
--- a/lib/libssl/src/ssl/d1_pkt.c
+++ b/lib/libssl/src/ssl/d1_pkt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: d1_pkt.c,v 1.45 2015/07/18 23:00:23 doug Exp $ */
+/* $OpenBSD: d1_pkt.c,v 1.46 2015/07/19 01:07:40 doug Exp $ */
/*
* DTLS implementation written by Nagendra Modadugu
* (nagendra@cs.stanford.edu) for the OpenSSL project 2005.
@@ -492,7 +492,7 @@ again:
/* check if we have the header */
if ((s->rstate != SSL_ST_READ_BODY) ||
- (s->packet_length < DTLS1_RT_HEADER_LENGTH)) {
+ (s->packet_length < DTLS1_RT_HEADER_LENGTH)) {
CBS header, seq_no;
uint16_t epoch, len, ssl_version;
uint8_t type;
@@ -544,6 +544,7 @@ again:
goto again;
/* now s->rstate == SSL_ST_READ_BODY */
+ p = (unsigned char *)CBS_data(&header);
}
/* s->rstate == SSL_ST_READ_BODY, get and decode the data */