linux/drivers/video/fbdev/core
Tomi Valkeinen 6080a89357 fbdev: fix cea_modes array size
CEA defines 64 modes, indexed from 1 to 64. modedb has cea_modes arrays,
which contains 64 entries. However, the code uses the CEA indices
directly, i.e. the first mode is at cea_modes[1]. This means the array
is one too short.

This does not cause references to uninitialized memory as the code in
fbmon only allows indexes up to 63, and the cea_modes does not contain
an entry for the mode 64 so it could not be used in any case.

However, the code contains a check 'if (idx > ARRAY_SIZE(cea_modes)',
and while that check is a no-op as at that point idx cannot be >= 63, it
upsets static checkers.

Fix this by increasing the cea_array size to be 65, and change the code
to allow mode 64.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
2015-08-20 10:20:11 +03:00
..
cfbcopyarea.c framebuffer: fix screen corruption when copying 2014-09-30 13:39:50 +03:00
cfbfillrect.c
cfbimgblt.c
fb_cmdline.c video/fbdev: Always built-in video= cmdline parsing 2014-08-06 14:50:02 +02:00
fb_ddc.c
fb_defio.c framebuffer: don't link fb_devio into kernel image unconditionally 2015-05-07 13:59:45 +03:00
fb_draw.h
fb_notify.c
fb_sys_fops.c
fbcmap.c
fbcvt.c fbdev: fix CVT vertical front and back porch values 2015-01-27 13:35:37 +02:00
fbmem.c video/fbdev: Always built-in video= cmdline parsing 2014-08-06 14:50:02 +02:00
fbmon.c fbdev: fix cea_modes array size 2015-08-20 10:20:11 +03:00
fbsysfs.c video: fbdev: use %*ph specifier to dump small buffers 2014-09-09 14:03:34 +03:00
Makefile framebuffer: don't link fb_devio into kernel image unconditionally 2015-05-07 13:59:45 +03:00
modedb.c fbdev: fix cea_modes array size 2015-08-20 10:20:11 +03:00
svgalib.c
syscopyarea.c video: fbdev: fix sys_copyarea 2015-01-30 09:46:59 +02:00
sysfillrect.c
sysimgblt.c