mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-16 08:44:21 +08:00
fbdev: omapfb: off by one in omapfb_register_client()
The omapfb_register_client[] array has OMAPFB_PLANE_NUM elements so the
> should be >= or we are one element beyond the end of the array.
Fixes: 8b08cf2b64
("OMAP: add TI OMAP framebuffer driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Imre Deak <imre.deak@solidboot.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
This commit is contained in:
parent
12382ad98c
commit
5ec1ec35b2
@ -958,7 +958,7 @@ int omapfb_register_client(struct omapfb_notifier_block *omapfb_nb,
|
||||
{
|
||||
int r;
|
||||
|
||||
if ((unsigned)omapfb_nb->plane_idx > OMAPFB_PLANE_NUM)
|
||||
if ((unsigned)omapfb_nb->plane_idx >= OMAPFB_PLANE_NUM)
|
||||
return -EINVAL;
|
||||
|
||||
if (!notifier_inited) {
|
||||
|
Loading…
Reference in New Issue
Block a user