]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - scripts/mod/modpost.c
kbuild: fix a buffer overflow in modpost
[linux-2.6-omap-h63xx.git] / scripts / mod / modpost.c
index 404ee0d0aac63de3dc73d5e51a3984810f9998e5..4d1c59063b2766fa7d4afc12c16947cb6b78fbb9 100644 (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;