summaryrefslogtreecommitdiffstats
path: root/crypto/openssh/bufaux.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/openssh/bufaux.c')
-rw-r--r--crypto/openssh/bufaux.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/crypto/openssh/bufaux.c b/crypto/openssh/bufaux.c
index 9401fe1..e24b5fc 100644
--- a/crypto/openssh/bufaux.c
+++ b/crypto/openssh/bufaux.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bufaux.c,v 1.54 2014/01/12 08:13:13 djm Exp $ */
+/* $OpenBSD: bufaux.c,v 1.56 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
@@ -216,7 +216,7 @@ buffer_get_cstring_ret(Buffer *buffer, u_int *length_ptr)
if (cp == ret + length - 1)
error("buffer_get_cstring_ret: string contains \\0");
else {
- bzero(ret, length);
+ explicit_bzero(ret, length);
free(ret);
return NULL;
}
@@ -346,7 +346,7 @@ buffer_get_bignum2_as_string_ret(Buffer *buffer, u_int *length_ptr)
}
ret = xmalloc(len);
memcpy(ret, p, len);
- memset(p, '\0', len);
+ explicit_bzero(p, len);
free(bin);
return ret;
}
@@ -383,7 +383,7 @@ buffer_put_bignum2_from_string(Buffer *buffer, const u_char *s, u_int l)
}
memcpy(p, s, l);
buffer_put_string(buffer, buf, l + pad);
- memset(buf, '\0', l + pad);
+ explicit_bzero(buf, l + pad);
free(buf);
}
OpenPOWER on IntegriCloud