Mercurial > dropbear
diff dbhelpers.c @ 1563:1cbb7b3d6703
Merge fuzzing branch
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Wed, 28 Feb 2018 22:12:05 +0800 |
parents | 4b1a807a3188 |
children | 119a459b00d0 |
line wrap: on
line diff
--- a/dbhelpers.c Wed Feb 28 15:10:14 2018 +0100 +++ b/dbhelpers.c Wed Feb 28 22:12:05 2018 +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 }