dect
/
linux-2.6
Archived
13
0
Fork 0

kbuild: fix a buffer overflow in modpost

When passing an file name > 1k the stack could be overflowed.
Not really a security issue, but still better plugged.
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
This commit is contained in:
Andi Kleen 2007-11-22 03:43:10 +01:00 committed by Sam Ravnborg
parent 58b7a68de3
commit 666ab414fe
1 changed files with 2 additions and 1 deletions

View File

@ -1656,7 +1656,6 @@ int main(int argc, char **argv)
{
struct module *mod;
struct buffer buf = { };
char fname[SZ];
char *kernel_read = NULL, *module_read = NULL;
char *dump_write = NULL;
int opt;
@ -1709,6 +1708,8 @@ int main(int argc, char **argv)
err = 0;
for (mod = modules; mod; mod = mod->next) {
char fname[strlen(mod->name) + 10];
if (mod->skip)
continue;