mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
OMAPFB: prevent buffer underflow in omapfb_parse_vram_param()
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 <dan.carpenter@oracle.com> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
This commit is contained in:
parent
5fa1f45de8
commit
5f215d2524
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue