linux_dsm_epyc7002/drivers/media
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
..
common [media] b2c2: Reset no_base_addr on skystarS2 attach failure 2015-05-18 17:48:13 -03:00
dvb-core [media] dvb-core: fix 32-bit overflow during bandwidth calculation 2015-05-20 14:01:46 -03:00
dvb-frontends [media] drxk: better handle errors 2015-06-05 07:58:52 -03:00
firewire [media] firewire: Deletion of an unnecessary check before the function call "dvb_unregister_device" 2014-11-25 13:30:31 -02:00
i2c [media] adv7604/cobalt: missing GPIOLIB dependency 2015-05-30 11:22:51 -03:00
mmc [media] siano: register media controller earlier 2015-02-26 09:10:39 -03:00
pci [media] ivtv: fix incorrect audio mode report in log_status 2015-05-30 11:35:25 -03:00
platform [media] sh_vou: avoid going past arrays 2015-06-05 08:19:50 -03:00
radio [media] wl128x: Allow compile test of GPIO consumers if !GPIOLIB 2015-05-30 11:45:40 -03:00
rc [media] rc: nuvoton-cir: Add support for writing wakeup samples via sysfs filter callback 2015-05-14 14:37:03 -03:00
tuners [media] si2157: implement signal strength stats 2015-06-05 06:33:45 -03:00
usb [media] em28xx: remove dead code 2015-06-05 08:03:01 -03:00
v4l2-core [media] v4l2: correct two SDR format names 2015-05-30 11:42:33 -03:00
Kconfig media controller: add EXPERIMENTAL to Kconfig option for DVB support 2015-05-08 14:48:49 -03:00
Makefile [media] bq/c-qcam, w9966, pms: move to staging in preparation for removal 2014-12-16 23:21:44 -02:00
media-device.c [media] media: Use strlcpy instead of custom code 2014-09-21 20:27:08 -03:00
media-devnode.c [media] media-devnode: just return 0 instead of using a var 2014-09-03 17:59:28 -03:00
media-entity.c [media] media: Fix a compiler warning in media_entity_pipeline_start() 2014-11-03 19:09:13 -02:00