linux/drivers/media/platform
Dan Carpenter 5d6de11c33 [media] mx2-camera: potential negative underflow bug
My static checker complains:

	drivers/media/platform/soc_camera/mx2_camera.c:1070
	mx2_emmaprp_resize() warn: no lower bound on 'num'

The heuristic is that it's looking for values which the user can
influence and we put an upper bound on them but we (perhaps
accidentally) allow negative numbers.

I am not very familiar with this code but I have looked at it and think
there might be a bug.  Making the variable unsigned seems like a safe
option either way and this silences the static checker warning.

The call tree is:
  -> subdev_do_ioctl()
     -> mx2_camera_set_fmt()
        -> mx2_emmaprp_resize()
The check:
	if (num > RESIZE_NUM_MAX)
can underflow and then we use "num" on the else path.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-26 06:47:43 -03:00
..
blackfin [media] be sure that HAS_DMA is enabled for vb2-dma-contig 2014-08-26 18:52:19 -03:00
coda [media] coda: coda-bit: Include "<linux/slab.h>" 2014-09-21 16:43:28 -03:00
davinci [media] davinci: remove an unneeded check 2014-09-23 16:13:45 -03:00
exynos4-is [media] marvel-ccic: just return 0 instead of using a var 2014-09-03 17:59:53 -03:00
exynos-gsc [media] gsc: Use %pad for dma_addr_t 2014-08-26 18:52:04 -03:00
marvell-ccic [media] marvel-ccic: don't initialize static vars with 0 2014-09-03 16:12:33 -03:00
omap [media] omap: simplify test logic 2014-09-03 17:59:25 -03:00
omap3isp [media] omap3isp: use true/false for boolean vars 2014-09-03 17:59:18 -03:00
s3c-camif [media] v4l: s3c-camif: Return V4L2_FIELD_NONE from pad-level set format 2014-07-22 01:00:23 -03:00
s5p-g2d [media] g2d: remove unused var 2014-08-26 18:52:11 -03:00
s5p-jpeg [media] s5p-jpeg: Fix compilation with COMPILE_TEST 2014-09-09 18:08:07 -03:00
s5p-mfc [media] media: s5p-mfc: rename special clock to sclk_mfc 2014-09-03 09:05:56 -03:00
s5p-tv [media] s5p-tv: Simplify the return logic 2014-09-03 17:59:27 -03:00
soc_camera [media] mx2-camera: potential negative underflow bug 2014-09-26 06:47:43 -03:00
ti-vpe [media] v4l: ti-vpe: Remove casting the return value which is a void pointer 2014-09-22 19:21:08 -03:00
vivid [media] vivid: add teletext support to VBI capture 2014-09-21 20:40:05 -03:00
vsp1 [media] v4l: vsp1: uds: Fix scaling of alpha layer 2014-07-17 12:45:00 -03:00
arv.c [media] media: remove the setting of the flag V4L2_FL_USE_FH_PRIO 2014-07-04 16:14:59 -03:00
fsl-viu.c [media] v4l: subdev: Move [gs]_std operation to video ops 2014-05-24 17:11:26 -03:00
indycam.c [media] indycam: remove g_chip_ident op 2013-06-17 08:49:47 -03:00
indycam.h
Kconfig [media] v4l: vsp1: fix driver dependencies 2014-09-03 09:10:24 -03:00
m2m-deinterlace.c [media] m2m-deinterlace: Convert to devm* API 2014-06-17 12:04:46 -03:00
Makefile [media] media: davinci: remove unneeded dependency ARCH_OMAP3 2014-09-21 20:17:22 -03:00
mem2mem_testdev.c [media] v4l: Support extending the v4l2_pix_format structure 2014-07-17 12:44:47 -03:00
mx2_emmaprp.c [media] enable COMPILE_TEST for MX2 eMMa-PrP driver 2014-08-26 18:52:16 -03:00
sh_veu.c [media] sh_veu: Include media/v4l2-image-sizes.h 2014-08-21 15:25:37 -05:00
sh_vou.c [media] sh_vou: comment unused vars 2014-01-13 11:30:26 -02:00
timblogiw.c [media] v4l: subdev: Move [gs]_std operation to video ops 2014-05-24 17:11:26 -03:00
via-camera.c [media] via-camera: simplify boolean tests 2014-09-03 17:59:26 -03:00
via-camera.h
vino.c [media] v4l: Support extending the v4l2_pix_format structure 2014-07-17 12:44:47 -03:00
vino.h