summaryrefslogtreecommitdiff
path: root/usr.bin/ssh/bufbn.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/ssh/bufbn.c')
-rw-r--r--usr.bin/ssh/bufbn.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/ssh/bufbn.c b/usr.bin/ssh/bufbn.c
index bb647ed87e4..aa8ab53050a 100644
--- a/usr.bin/ssh/bufbn.c
+++ b/usr.bin/ssh/bufbn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bufbn.c,v 1.8 2013/11/08 11:15:19 dtucker Exp $*/
+/* $OpenBSD: bufbn.c,v 1.9 2014/02/02 03:44:31 djm Exp $*/
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -78,7 +78,7 @@ buffer_put_bignum_ret(Buffer *buffer, const BIGNUM *value)
/* Store the binary data. */
buffer_append(buffer, buf, oi);
- memset(buf, 0, bin_size);
+ explicit_bzero(buf, bin_size);
free(buf);
return (0);
@@ -171,7 +171,7 @@ buffer_put_bignum2_ret(Buffer *buffer, const BIGNUM *value)
}
hasnohigh = (buf[1] & 0x80) ? 0 : 1;
buffer_put_string(buffer, buf+hasnohigh, bytes-hasnohigh);
- memset(buf, 0, bytes);
+ explicit_bzero(buf, bytes);
free(buf);
return (0);
}