The argument of VIDIOC_S_INPUT is __u32 according to
http://v4l2spec.bytesex.org/spec/r11217.htm . The documentation
only says that a pointer to a number should be passed, and this
number should be "as in the struct v4l2_input index field". The
index field there has __u32 type.
This change prevents the following condition to fail:
if (*index >= MAX_EM28XX_INPUT)
return -EINVAL;
Imagine for example if index is signed: index=0x80000000=-2147483648,
then the condition above won't return -EINVAL.
diff -r 932738881388 em28xx-video.c
--- a/em28xx-video.c Thu Dec 11 09:33:26 2008 +0100
+++ b/em28xx-video.c Mon Dec 15 22:33:35 2008 +0100
@@ -440,7 +440,7 @@
}
-static void video_mux(struct em28xx *dev, int index)
+static void video_mux(struct em28xx *dev, __u32 index)
{
int input = INPUT(index)->vmux;
struct v4l2_routing route;
@@ -2052,7 +2052,7 @@
}
case VIDIOC_S_INPUT:
{
- int *index = arg;
+ __u32 *index = arg;
if (*index >= MAX_EM28XX_INPUT)
return -EINVAL;
_______________________________________________
Em28xx mailing list
[email protected]
http://mcentral.de/mailman/listinfo/em28xx