+ uvcvideo-prevent-information-loss-with-removing-implicit-casting.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     uvcvideo: prevent information loss with removing implicit casting
has been added to the -mm tree.  Its filename is
     uvcvideo-prevent-information-loss-with-removing-implicit-casting.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find
out what to do about this

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: uvcvideo: prevent information loss with removing implicit casting
From: Németh Márton <nm127@xxxxxxxxxxx>

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/

Signed-off-by: Németh Márton <nm127@xxxxxxxxxxx>
Cc: Laurent Pinchart <laurent.pinchart@xxxxxxxxx>
Cc: Mauro Carvalho Chehab <mchehab@xxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 drivers/media/video/uvc/uvc_v4l2.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -puN drivers/media/video/uvc/uvc_v4l2.c~uvcvideo-prevent-information-loss-with-removing-implicit-casting drivers/media/video/uvc/uvc_v4l2.c
--- a/drivers/media/video/uvc/uvc_v4l2.c~uvcvideo-prevent-information-loss-with-removing-implicit-casting
+++ a/drivers/media/video/uvc/uvc_v4l2.c
@@ -648,7 +648,7 @@ static long uvc_v4l2_do_ioctl(struct fil
 
 	case VIDIOC_S_INPUT:
 	{
-		u8 input = *(u32 *)arg + 1;
+		u32 input = *(u32 *)arg + 1;
 
 		if ((ret = uvc_acquire_privileges(handle)) < 0)
 			return ret;
_

Patches currently in -mm which might be from nm127@xxxxxxxxxxx are

uvcvideo-prevent-information-loss-with-removing-implicit-casting.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux