]> git.baikalelectronics.ru Git - kernel.git/commit
V4L/DVB (12341): zl10353 and qt1010: fix stack corruption bug
authorJan Nikitenko <jan.nikitenko@gmail.com>
Thu, 18 Jun 2009 11:11:57 +0000 (08:11 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Thu, 13 Aug 2009 23:39:02 +0000 (20:39 -0300)
commitbe0dc2c40678fbff7bc18c850b15386344099ed8
tree72b5a9baf0ea344e36ec6db04b507dae3b4233f5
parent1cbc4dee65da6fe5963efb69d4d1d2f3d6fd163a
V4L/DVB (12341): zl10353 and qt1010: fix stack corruption bug

Fixes stack corruption bug present in dump_regs function of zl10353 and
qt1010 drivers: the buffer buf was one byte smaller than required -
there are 4 chars for address prefix, 16 * 3 chars for dump of 16 eeprom
bytes per line and 1 byte for zero ending the string required, i.e. 53
bytes, but only 52 were provided.

The one byte missing in stack based buffer buf can cause stack
corruption possibly leading to kernel oops, as discovered originally
with af9015 driver (af9015: fix stack corruption bug).

Signed-off-by: Jan Nikitenko <jan.nikitenko@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/common/tuners/qt1010.c
drivers/media/dvb/frontends/zl10353.c