This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: uvcvideo: Fix bit overflow in uvc_probe_video
Author:  Hangyu Hua <[email protected]>
Date:    Thu Mar 24 10:13:08 2022 +0100

probe->dwMaxPayloadTransferSize is a 32bit value, but bandwidth is 16bit. This
may lead to a bit overflow.

Signed-off-by: Hangyu Hua <[email protected]>
Signed-off-by: Laurent Pinchart <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>

 drivers/media/usb/uvc/uvc_video.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

---

diff --git a/drivers/media/usb/uvc/uvc_video.c 
b/drivers/media/usb/uvc/uvc_video.c
index 1b4cc934109e..e016f88bdf96 100644
--- a/drivers/media/usb/uvc/uvc_video.c
+++ b/drivers/media/usb/uvc/uvc_video.c
@@ -383,7 +383,6 @@ int uvc_probe_video(struct uvc_streaming *stream,
        struct uvc_streaming_control *probe)
 {
        struct uvc_streaming_control probe_min, probe_max;
-       u16 bandwidth;
        unsigned int i;
        int ret;
 
@@ -421,8 +420,7 @@ int uvc_probe_video(struct uvc_streaming *stream,
                if (stream->intf->num_altsetting == 1)
                        break;
 
-               bandwidth = probe->dwMaxPayloadTransferSize;
-               if (bandwidth <= stream->maxpsize)
+               if (probe->dwMaxPayloadTransferSize <= stream->maxpsize)
                        break;
 
                if (stream->dev->quirks & UVC_QUIRK_PROBE_MINMAX) {

_______________________________________________
linuxtv-commits mailing list
[email protected]
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to