mirror of
https://github.com/torvalds/linux.git
synced 2024-12-04 18:13:04 +00:00
5ac417efe6
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> |
||
---|---|---|
.. | ||
am437x | ||
blackfin | ||
coda | ||
davinci | ||
exynos4-is | ||
exynos-gsc | ||
marvell-ccic | ||
omap | ||
omap3isp | ||
s3c-camif | ||
s5p-g2d | ||
s5p-jpeg | ||
s5p-mfc | ||
s5p-tv | ||
soc_camera | ||
ti-vpe | ||
vivid | ||
vsp1 | ||
xilinx | ||
arv.c | ||
fsl-viu.c | ||
Kconfig | ||
m2m-deinterlace.c | ||
Makefile | ||
mx2_emmaprp.c | ||
sh_veu.c | ||
sh_vou.c | ||
timblogiw.c | ||
via-camera.c | ||
via-camera.h | ||
vim2m.c |