]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] update fix for potential integer overflow in zoran driver
authorAndrew Morton <akpm@osdl.org>
Tue, 13 Apr 2004 11:49:20 +0000 (04:49 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Tue, 13 Apr 2004 11:49:20 +0000 (04:49 -0700)
From: Dave Jones <davej@redhat.com>

2.4 already had this fixed, but uses a somewhat larger value to clip at.
For uniformity sake, perhaps they should be the same?  Patch below makes
it match 2.4-bk

drivers/media/video/zoran_procfs.c

index 7e1bd5471a5ea4e633233ff3f4a8f33927010967..703d6bf8e516eb767626c5359af8f0b7a3fa153d 100644 (file)
@@ -204,8 +204,7 @@ zoran_write_proc (struct file   *file,
        char *line, *ldelim, *varname, *svar, *tdelim;
        struct zoran *zr;
 
-       /* Random maximum */
-       if (count > 256)
+       if (count > 32768)      /* Stupidity filter */
                return -EINVAL;
 
        zr = (struct zoran *) data;