Commit 1bb902d8 authored by Alan Cox's avatar Alan Cox Committed by Linus Torvalds

[PATCH] fix 2 byte data leak due to padding

parent d9699f17
...@@ -106,7 +106,7 @@ static int cp_old_stat(struct kstat *stat, struct __old_kernel_stat __user * sta ...@@ -106,7 +106,7 @@ static int cp_old_stat(struct kstat *stat, struct __old_kernel_stat __user * sta
{ {
static int warncount = 5; static int warncount = 5;
struct __old_kernel_stat tmp; struct __old_kernel_stat tmp;
if (warncount > 0) { if (warncount > 0) {
warncount--; warncount--;
printk(KERN_WARNING "VFS: Warning: %s using old stat() call. Recompile your binary.\n", 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 ...@@ -116,6 +116,7 @@ static int cp_old_stat(struct kstat *stat, struct __old_kernel_stat __user * sta
warncount = 0; warncount = 0;
} }
memset(&tmp, 0, sizeof(struct __old_kernel_stat));
tmp.st_dev = stat->dev; tmp.st_dev = stat->dev;
tmp.st_ino = stat->ino; tmp.st_ino = stat->ino;
tmp.st_mode = stat->mode; tmp.st_mode = stat->mode;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment