Mercurial > dropbear
changeset 1374:4b1a807a3188 fuzz
Just use memset, it should'be be optimised out in a separate file
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Thu, 25 May 2017 22:19:46 +0800 |
parents | 9891bc31a1b3 |
children | d8215479a58a |
files | dbhelpers.c |
diffstat | 1 files changed, 2 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/dbhelpers.c Thu May 25 00:12:07 2017 +0800 +++ b/dbhelpers.c Thu May 25 22:19:46 2017 +0800 @@ -9,16 +9,8 @@ #elif defined(HAVE_EXPLICIT_BZERO) explicit_bzero(data, len); #else -/* Based on the method in David Wheeler's - * "Secure Programming for Linux and Unix HOWTO". May not be safe - * against link-time optimisation. */ - volatile char *p = data; - - if (data == NULL) - return; - while (len--) { - *p++ = 0x0; - } + volatile void *p = data; + memset(p, 0x0, len); #endif }