Skip to content

Commit e5515cf

Browse files
committed
glibc: add explicit_bzero() function
Signed-off-by: Waldemar Kozaczuk <jwkozaczuk@gmail.com>
1 parent 8ae4418 commit e5515cf

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1585,6 +1585,7 @@ libc += stdlib/strtod.o
15851585
libc += stdlib/wcstol.o
15861586

15871587
libc += string/__memcpy_chk.o
1588+
libc += string/explicit_bzero.o
15881589
libc += string/__explicit_bzero_chk.o
15891590
musl += string/bcmp.o
15901591
musl += string/bcopy.o

libc/string/explicit_bzero.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#include <string.h>
2+
#include <stdlib.h>
3+
4+
void explicit_bzero(void *dest, size_t len)
5+
{
6+
memset(dest, 0, len);
7+
return;
8+
}

0 commit comments

Comments
 (0)