linux/drivers/media/platform
Mauro Carvalho Chehab 5ac417efe6 [media] sh_vou: avoid going past arrays
Smatch reports two issues:
	drivers/media/platform/sh_vou.c:670 vou_adjust_output() error: buffer overflow 'vou_scale_v_num' 3 <= 4
	drivers/media/platform/sh_vou.c:670 vou_adjust_output() error: buffer overflow 'vou_scale_v_den' 3 <= 4

It seems that there's actually a bug here: the same var (idx) is used
as an index for vertical and horizontal scaling arrays. However,
there are 4 elements on the h arrays, and only 3 at the v ones.

On the first loop, it may select index 4 for the horizontal array.

In this case, if the second loop fails to select an index, the
code would keep using 4 for the vertical array, with is past of
the array sizes.

The intent here seems to use index 0, if the scale is not found.

So, use a separate var for the vertical index.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-06-05 08:19:50 -03:00
..
am437x [media] v4l2: replace s_mbus_fmt by set_fmt in bridge drivers 2015-05-01 09:01:16 -03:00
blackfin [media] v4l2: replace s_mbus_fmt by set_fmt in bridge drivers 2015-05-01 09:01:16 -03:00
coda [media] coda: Set last buffer flag and fix EOS event 2015-05-12 03:54:07 -03:00
davinci [media] media: davinci: vpbe: use v4l2_get_timestamp() 2015-06-05 06:36:23 -03:00
exynos4-is [media] exynos4_is: exynos4-fimc requires i2c 2015-05-13 16:06:28 -03:00
exynos-gsc [media] media: platform: exynos-gsc: Constify platform_device_id 2015-05-12 03:48:01 -03:00
marvell-ccic [media] marvell-ccic: fix RGB444 format 2015-05-12 04:04:26 -03:00
omap [media] media: omap/omap_vout: fix type of input members to omap_vout_setup_vrfb_bufs() 2015-03-03 11:22:58 -03:00
omap3isp [media] media: omap3isp: remove unused clkdev 2015-04-10 10:25:30 -03:00
s3c-camif [media] media: platform: s3c-camif: Constify platform_device_id 2015-05-12 03:48:58 -03:00
s5p-g2d [media] media: platform: s5p: Constify platform_device_id 2015-05-12 03:49:22 -03:00
s5p-jpeg Merge branch 'patchwork' into v4l_for_linus 2015-04-21 06:12:35 -03:00
s5p-mfc [media] media: s5p-mfc: fix sparse warnings 2015-06-05 06:37:24 -03:00
s5p-tv [media] media: platform: s5p: Constify platform_device_id 2015-05-12 03:49:22 -03:00
soc_camera [media] rcar-vin: use monotonic timestamps 2015-05-18 16:27:30 -03:00
ti-vpe [media] media: ti-vpe: Use mem-to-mem ioctl helpers 2015-02-02 13:34:18 -02:00
vivid [media] vivid: don't use more than 1024 bytes of stack 2015-06-05 07:41:54 -03:00
vsp1 [media] v4l2-subdev: add support for the new enum_frame_size 'which' field 2015-03-23 11:48:55 -07:00
xilinx [media] v4l: xilinx: harmless buffer overflow 2015-05-13 16:26:48 -03:00
arv.c
fsl-viu.c [media] constify of_device_id array 2015-05-12 03:58:16 -03:00
Kconfig [media] v4l: xilinx: Add Xilinx Video IP core 2015-04-03 00:59:49 -03:00
m2m-deinterlace.c [media] m2m-deinterlace: remove dead code 2015-05-01 06:29:50 -03:00
Makefile [media] v4l: xilinx: Add Xilinx Video IP core 2015-04-03 00:59:49 -03:00
mx2_emmaprp.c Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
sh_veu.c [media] sh_veu: v4l2_dev wasn't set 2015-04-01 06:56:55 -03:00
sh_vou.c [media] sh_vou: avoid going past arrays 2015-06-05 08:19:50 -03:00
timblogiw.c media: platform: drop owner assignment from platform_drivers 2014-10-20 16:20:44 +02:00
via-camera.c [media] v4l2: replace s_mbus_fmt by set_fmt in bridge drivers 2015-05-01 09:01:16 -03:00
via-camera.h
vim2m.c [media] vim2m: drop format description 2015-05-01 06:56:35 -03:00