]> git.proxmox.com Git - mirror_ubuntu-bionic-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)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 14 Aug 2018 10:29:35 +0000 (12:29 +0200)
commit2739185dd66a2fefdea20b1974bea8738f5c2fed
treed14c74fccdde0268d537c2089ff731679abdda46
parentcd97307705205baebaede52a36455a2fff5a9542
media: Don't let tvp5150_get_vbi() go out of vbi_ram_default array

BugLink: http://bugs.launchpad.net/bugs/1783418
[ Upstream commit 3dd6b560dc5d59e7cb6dbda6e85dc9af7925fcf8 ]

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>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/media/i2c/tvp5150.c