svn commit: branches/uClibc_0_9_28/libc/sysdeps/linux/common
vapier at uclibc.org
vapier at uclibc.org
Sun Jan 28 06:27:48 UTC 2007
Author: vapier
Date: 2007-01-27 22:27:47 -0800 (Sat, 27 Jan 2007)
New Revision: 17577
Log:
make sure we clear out the buffer so that random garbage on the stack doesnt screw us up
Modified:
branches/uClibc_0_9_28/libc/sysdeps/linux/common/xstatconv.c
Changeset:
Modified: branches/uClibc_0_9_28/libc/sysdeps/linux/common/xstatconv.c
===================================================================
--- branches/uClibc_0_9_28/libc/sysdeps/linux/common/xstatconv.c 2007-01-28 06:18:24 UTC (rev 17576)
+++ branches/uClibc_0_9_28/libc/sysdeps/linux/common/xstatconv.c 2007-01-28 06:27:47 UTC (rev 17577)
@@ -30,11 +30,13 @@
# undef __USE_FILE_OFFSET64
#endif
#include <sys/stat.h>
+#include <string.h>
#include "xstatconv.h"
void __xstat_conv(struct kernel_stat *kbuf, struct stat *buf)
{
/* Convert to current kernel version of `struct stat'. */
+ memset(buf, 0x00, sizeof(*buf));
buf->st_dev = kbuf->st_dev;
buf->st_ino = kbuf->st_ino;
buf->st_mode = kbuf->st_mode;
@@ -60,6 +62,7 @@
void __xstat64_conv(struct kernel_stat64 *kbuf, struct stat64 *buf)
{
/* Convert to current kernel version of `struct stat64'. */
+ memset(buf, 0x00, sizeof(*buf));
buf->st_dev = kbuf->st_dev;
buf->st_ino = kbuf->st_ino;
#ifdef _HAVE_STAT64___ST_INO
More information about the uClibc-cvs
mailing list