aboutsummaryrefslogtreecommitdiffstats
path: root/src/strings
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2016-04-03 16:06:49 +0200
committerMattias Andrée <maandree@kth.se>2016-04-03 16:06:52 +0200
commit8ee6a0d742a7e46bd352f6a389b2138138820c17 (patch)
treee72169701ed01f3fc12855a4aa9def681885df4e /src/strings
parentwhoops, wrong type (diff)
downloadslibc-8ee6a0d742a7e46bd352f6a389b2138138820c17.tar.gz
slibc-8ee6a0d742a7e46bd352f6a389b2138138820c17.tar.bz2
slibc-8ee6a0d742a7e46bd352f6a389b2138138820c17.tar.xz
explicit_bzero: set all bits to 1 before setting all bits to 0
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r--src/strings/explicit_bzero.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/strings/explicit_bzero.c b/src/strings/explicit_bzero.c
index 42e46b4..af37ea5 100644
--- a/src/strings/explicit_bzero.c
+++ b/src/strings/explicit_bzero.c
@@ -42,6 +42,7 @@ void* (*volatile __slibc_explicit_memset)(void*, int, size_t) = memset;
*/
void explicit_bzero(void* segment, size_t size)
{
+ __slibc_explicit_memset(segment, ~0, size);
__slibc_explicit_memset(segment, 0, size);
}