summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/common
diff options
context:
space:
mode:
Diffstat (limited to 'libc/sysdeps/linux/common')
-rw-r--r--libc/sysdeps/linux/common/statfix.c1
-rw-r--r--libc/sysdeps/linux/common/statfix64.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/libc/sysdeps/linux/common/statfix.c b/libc/sysdeps/linux/common/statfix.c
index 3921deb0f..996cf1346 100644
--- a/libc/sysdeps/linux/common/statfix.c
+++ b/libc/sysdeps/linux/common/statfix.c
@@ -28,6 +28,7 @@
/* Convert from the kernel's version of struct stat to libc's version */
void statfix(struct libc_stat *libcstat, struct kernel_stat *kstat)
{
+ memset(libcstat, 0, sizeof(struct libc_stat));
libcstat->st_dev = kstat->st_dev;
libcstat->st_ino = kstat->st_ino;
libcstat->st_mode = kstat->st_mode;
diff --git a/libc/sysdeps/linux/common/statfix64.c b/libc/sysdeps/linux/common/statfix64.c
index 00dafc562..540f350ca 100644
--- a/libc/sysdeps/linux/common/statfix64.c
+++ b/libc/sysdeps/linux/common/statfix64.c
@@ -31,6 +31,7 @@
/* Convert from the kernel's version of struct stat to libc's version */
void statfix64(struct libc_stat64 *libcstat, struct kernel_stat64 *kstat)
{
+ memset(libcstat, 0, sizeof(struct libc_stat64));
libcstat->st_dev = kstat->st_dev;
libcstat->st_ino = kstat->st_ino;
libcstat->st_mode = kstat->st_mode;