]> git.baikalelectronics.ru Git - kernel.git/commit
[media] qt1010: avoid going past array
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>
Wed, 29 Apr 2015 12:33:02 +0000 (09:33 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Thu, 30 Apr 2015 17:57:35 +0000 (14:57 -0300)
commit876f7b406a23abed52676ec15abfa97847927a45
tree760d763f5226452fdc0448387019bd521f6e8cc5
parent606416e90168949c929b47373868713342f44249
[media] qt1010: avoid going past array

As reported by smatch:
drivers/media/tuners/qt1010.c:357 qt1010_init() error: buffer overflow 'i2c_data' 34 <= 34

This should not happen with the current code, as the i2c_data array
doesn't end with a QT1010_M1, but it doesn't hurt add a BUG_ON
to notify if one modifies it and breaks.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/tuners/qt1010.c