X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=fs%2Fexec.c;h=20df02c1cc70190b04802493d5a25b802e0adcba;hb=fc221525bd63887f74c18708ee1d654d019fa8c3;hp=18c45cac368fe3ec830c7f0c8433e5cd2db0fc2d;hpb=b1d778b970ce52e02ca6a7f34ba167fe95bc1cc4;p=~andy%2Flinux diff --git a/fs/exec.c b/fs/exec.c index 18c45cac368..20df02c1cc7 100644 --- a/fs/exec.c +++ b/fs/exec.c @@ -434,8 +434,9 @@ static int count(struct user_arg_ptr argv, int max) if (IS_ERR(p)) return -EFAULT; - if (i++ >= max) + if (i >= max) return -E2BIG; + ++i; if (fatal_signal_pending(current)) return -ERESTARTNOHAND;