]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/compat.c
exec.c, compat.c: fix count(), compat_count() bounds checking
[linux-2.6-omap-h63xx.git] / fs / compat.c
index 075d0509970de479c78e796cb4ce11d94945fbb5..aae13d31612f04208e6fdb2f23a9189baf0f6b72 100644 (file)
@@ -1239,7 +1239,7 @@ static int compat_count(compat_uptr_t __user *argv, int max)
                        if (!p)
                                break;
                        argv++;
-                       if(++i > max)
+                       if (i++ >= max)
                                return -E2BIG;
                }
        }