]> err.no Git - linux-2.6/blobdiff - kernel/module.c
[DCCP] ipv6: cleanups
[linux-2.6] / kernel / module.c
index e058aedf6b932d35e23a3c0acb18ff3cb01b78c1..5aad477ddc79c94567c02e9ee704f1eb71fa1b66 100644 (file)
@@ -1670,6 +1670,9 @@ static struct module *load_module(void __user *umod,
                goto free_mod;
        }
 
+       /* Userspace could have altered the string after the strlen_user() */
+       args[arglen - 1] = '\0';
+
        if (find_module(mod->name)) {
                err = -EEXIST;
                goto free_mod;