From 1bb902d83de09e52c988051d414739c7e6e5f6d8 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Thu, 31 Jul 2003 05:18:03 -0700 Subject: [PATCH] [PATCH] fix 2 byte data leak due to padding --- fs/stat.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/stat.c b/fs/stat.c index 2bce117d51d..7f034fa65d8 100644 --- a/fs/stat.c +++ b/fs/stat.c @@ -106,7 +106,7 @@ static int cp_old_stat(struct kstat *stat, struct __old_kernel_stat __user * sta { static int warncount = 5; struct __old_kernel_stat tmp; - + if (warncount > 0) { warncount--; printk(KERN_WARNING "VFS: Warning: %s using old stat() call. Recompile your binary.\n", @@ -116,6 +116,7 @@ static int cp_old_stat(struct kstat *stat, struct __old_kernel_stat __user * sta warncount = 0; } + memset(&tmp, 0, sizeof(struct __old_kernel_stat)); tmp.st_dev = stat->dev; tmp.st_ino = stat->ino; tmp.st_mode = stat->mode; -- 2.11.4.GIT