提交 666ab414 编写于 作者: A Andi Kleen 提交者: Sam Ravnborg

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: NAndi Kleen <ak@suse.de>
Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
上级 58b7a68d
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册