OMAPFB: prevent buffer underflow in omapfb_parse_vram_param()
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 17 Nov 2017 16:21:49 +0000 (17:21 +0100)
committerBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Fri, 17 Nov 2017 16:21:49 +0000 (17:21 +0100)
commit5f215d252496543ba22299bccef5062d30d63cfe
treea991f9862eb12e91ded049f2059a894f4eeb785d
parent5fa1f45de8fd697d9f23050e20dd65c0998e6107
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>
drivers/video/fbdev/omap2/omapfb/omapfb-main.c