]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - fs/binfmt_script.c
binfmt_misc.c: avoid potential kernel stack overflow
[karo-tx-linux.git] / fs / binfmt_script.c
index ab33939b12a7efb8d754fcc80b89bfc88651a33b..9e3963f7ebf19f85a1742ff034bbb518d51a6aff 100644 (file)
@@ -29,7 +29,7 @@ static int load_script(struct linux_binprm *bprm,struct pt_regs *regs)
         * Sorta complicated, but hopefully it will work.  -TYT
         */
 
-       bprm->sh_bang++;
+       bprm->sh_bang = 1;
        allow_write_access(bprm->file);
        fput(bprm->file);
        bprm->file = NULL;