kernel_optimize_test/drivers/media/dvb
Dan Carpenter 9369cc96af [media] av7110: wrong limiter in av7110_start_feed()
Smatch complains that the wrong limiter is used here:
drivers/media/dvb/ttpci/av7110.c +906 dvb_feed_start_pid(12)
	error: buffer overflow 'npids' 5 <= 19

Here is the problem code:
   905          i = dvbdmxfeed->pes_type;
   906          npids[i] = (pid[i]&0x8000) ? 0 : pid[i];

"npids" is a 5 element array declared on the stack.  If
dvbdmxfeed->pes_type is more than 4 we probably put a (u16)0 past
the end of the array.

If dvbdmxfeed->pes_type is over 4 the rest of the function doesn't
do anything.  dvbdmxfeed->pes_type is capped at less than
DMX_TS_PES_OTHER (20) in the caller function, but I changed it to
less than or equal to DMX_TS_PES_PCR (4).

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 14:26:02 -02:00
..
b2c2 [media] drivers/media: do not use EXTRA_CFLAGS 2011-09-03 18:50:59 -03:00
bt8xx [media] drivers/media: do not use EXTRA_CFLAGS 2011-09-03 18:50:59 -03:00
ddbridge staging: Move media drivers to staging/media 2011-11-03 07:59:03 -02:00
dm1105 [media] drivers/media: do not use EXTRA_CFLAGS 2011-09-03 18:50:59 -03:00
dvb-core [media] dvb: Allow select between DVB-C Annex A and Annex C 2011-11-11 12:46:23 -02:00
dvb-usb [media] TT CT-3650 i2c fix 2011-11-24 14:25:17 -02:00
firewire [media] firedtv: change some -EFAULT returns to more fitting error codes 2011-07-27 17:53:38 -03:00
frontends Merge tag 'v3.2-rc2' into staging/for_v3.3 2011-11-23 19:42:09 -02:00
mantis [media] Refactor Mantis DMA transfer to deliver 16Kb TS data per interrupt 2011-09-25 08:43:06 -03:00
ngene staging: Move media drivers to staging/media 2011-11-03 07:59:03 -02:00
pluto2 [media] drivers/media: do not use EXTRA_CFLAGS 2011-09-03 18:50:59 -03:00
pt1 [media] drivers/media: do not use EXTRA_CFLAGS 2011-09-03 18:50:59 -03:00
siano Merge branch 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux 2011-11-06 19:44:47 -08:00
ttpci [media] av7110: wrong limiter in av7110_start_feed() 2011-11-24 14:26:02 -02:00
ttusb-budget [media] drivers/media: do not use EXTRA_CFLAGS 2011-09-03 18:50:59 -03:00
ttusb-dec [media] drivers/media: do not use EXTRA_CFLAGS 2011-09-03 18:50:59 -03:00
Kconfig [media] ddbridge: Allow compiling of the driver 2011-07-27 17:55:45 -03:00
Makefile [media] ddbridge: Allow compiling of the driver 2011-07-27 17:55:45 -03:00