summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/cx231xx/cx231xx-avcore.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@skynet.be>2009-04-15 14:01:58 +0200
committerLaurent Pinchart <laurent.pinchart@skynet.be>2009-04-15 14:01:58 +0200
commitd4b7ca589b79b68daaa259887670edeef1ca37d4 (patch)
tree24303766ba2d47f165de0924af3659f72f38ce52 /linux/drivers/media/video/cx231xx/cx231xx-avcore.c
parent27ff4755ec3de948d144d09307b5d9ffb74dc7e2 (diff)
downloadmediapointer-dvb-s2-d4b7ca589b79b68daaa259887670edeef1ca37d4.tar.gz
mediapointer-dvb-s2-d4b7ca589b79b68daaa259887670edeef1ca37d4.tar.bz2
uvcvideo: Prevent invormation loss with removing implicit casting
From: Márton Németh <nm127@freemail.hu> The uvcvideo driver supports only one input, which is input 0. For all other input index the return value shall be EINVAL. This patch fixes the problem when the value 0x80000000 was incorrectly casted and treated as a zero value. The patch was tested with v4l-test 0.10 [2] with CNF7129 webcam found on EeePC 901. References: [1] V4L2 API specification, revision 0.24 http://v4l2spec.bytesex.org/spec/r11217.htm [2] v4l-test: Test environment for Video For Linux Two API http://v4l-test.sourceforge.net/ [Modified by Laurent Pinchart] Invalid input value (u32)-1 would be accepted due to integer overflow. Make sure the driver rejects it and returns -EINVAL. Priority: normal Signed-off-by: Márton Németh <nm127@freemail.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be>
Diffstat (limited to 'linux/drivers/media/video/cx231xx/cx231xx-avcore.c')
0 files changed, 0 insertions, 0 deletions