]> Git Repo - linux.git/commitdiff
OMAPFB: prevent buffer underflow in omapfb_parse_vram_param()
authorDan Carpenter <[email protected]>
Fri, 17 Nov 2017 16:21:49 +0000 (17:21 +0100)
committerBartlomiej Zolnierkiewicz <[email protected]>
Fri, 17 Nov 2017 16:21:49 +0000 (17:21 +0100)
We cap the upper bound of "fbnum" but we also need to check for
negatives or make the type unsigned.

Signed-off-by: Dan Carpenter <[email protected]>
Cc: Tomi Valkeinen <[email protected]>
Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]>
drivers/video/fbdev/omap2/omapfb/omapfb-main.c

index 1d7c012f09dbb70cb0c5d1aed909272c94c4b4b3..e08e5664e330f84adcb99afbfda605556611fe64 100644 (file)
@@ -1477,7 +1477,7 @@ static int omapfb_alloc_fbmem_display(struct fb_info *fbi, unsigned long size,
 static int omapfb_parse_vram_param(const char *param, int max_entries,
                unsigned long *sizes, unsigned long *paddrs)
 {
-       int fbnum;
+       unsigned int fbnum;
        unsigned long size;
        unsigned long paddr = 0;
        char *p, *start;
This page took 0.057842 seconds and 4 git commands to generate.