summaryrefslogtreecommitdiff
path: root/lib/libssl/s3_pkt.c
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2016-07-10 23:07:35 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2016-07-10 23:07:35 +0000
commit04a1a01ddbee2ae511794fe2aab871131ba24b5b (patch)
tree83c1f9d967598a3a2f585d8cafab9769cf6a0492 /lib/libssl/s3_pkt.c
parent6292826c2427c49fa679c9cf1d283e884666dfe1 (diff)
zero the read buffer after copying data to user so it doesn't linger.
ok beck
Diffstat (limited to 'lib/libssl/s3_pkt.c')
-rw-r--r--lib/libssl/s3_pkt.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libssl/s3_pkt.c b/lib/libssl/s3_pkt.c
index 153b37612f7..0e97be6728b 100644
--- a/lib/libssl/s3_pkt.c
+++ b/lib/libssl/s3_pkt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: s3_pkt.c,v 1.57 2015/09/12 16:10:07 doug Exp $ */
+/* $OpenBSD: s3_pkt.c,v 1.58 2016/07/10 23:07:34 tedu Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -956,6 +956,7 @@ start:
memcpy(buf, &(rr->data[rr->off]), n);
if (!peek) {
+ memset(&(rr->data[rr->off]), 0, n);
rr->length -= n;
rr->off += n;
if (rr->length == 0) {