]> git.baikalelectronics.ru Git - kernel.git/commit
media: Don't let tvp5150_get_vbi() go out of vbi_ram_default array
authorMauro Carvalho Chehab <mchehab@s-opensource.com>
Mon, 19 Feb 2018 18:23:39 +0000 (13:23 -0500)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Fri, 23 Feb 2018 16:44:09 +0000 (11:44 -0500)
commitffb960ea13dfd759563b02e8a7fc92e58434e4b5
tree01e74d71a2a2a57736fa33a50582f04905bdcd65
parent1f0061f6831f6f4c7cf3c2a61b8244fb2eb3da31
media: Don't let tvp5150_get_vbi() go out of vbi_ram_default array

As pointed by Dan, possible values for bits[3:0] of te Line Mode Registers
can range from 0x0 to 0xf, but the check logic allow values ranging
from 0x0 to 0xe.

As static arrays are initialized with zero, using a value without
an explicit initializer at the array won't cause any harm.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/i2c/tvp5150.c