linux/drivers/media/usb
Laurent Pinchart c601f53f8f [media] v4l: uvcvideo: Fix buffer completion size check
Commit e93e7fd9f5 ("v4l2: uvcvideo: Allow
using larger buffers") reworked the buffer size sanity check at buffer
completion time to use the frame size instead of the allocated buffer
size. However, it introduced two bugs in doing so:

- it assigned the allocated buffer size to the frame_size field, instead
  of assigning the correct frame size

- it performed the assignment in the S_FMT handler, resulting in the
  frame_size field being uninitialized if the userspace application
  doesn't call S_FMT.

Fix both issues by removing the frame_size field and validating the
buffer size against the UVC video control dwMaxFrameSize.

Fixes: e93e7fd9f5 ("v4l2: uvcvideo: Allow using larger buffers")

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-10-21 08:53:27 -02:00
..
airspy [media] airspy: enhance sample rate debug calculation precision 2014-09-21 16:42:33 -03:00
as102 [media] as102: fix endiannes casts 2014-09-26 06:47:52 -03:00
au0828 [media] au0828: fill tuner type on all boards 2014-09-22 17:51:24 -03:00
b2c2 [media] drivers: media: usb: b2c2: use usb_*_coherent() instead of pci_*_consistent() in flexcop-usb.c 2013-10-17 11:26:41 -03:00
cpia2 [media] media: remove the setting of the flag V4L2_FL_USE_FH_PRIO 2014-07-04 16:14:59 -03:00
cx231xx [media] usb drivers: use %zu instead of %zd 2014-09-26 06:51:00 -03:00
dvb-usb [media] dib0700_devices: Use c99 initializers for structures. 2014-09-22 19:00:28 -03:00
dvb-usb-v2 [media] anysee: make sure loading modules is const 2014-10-21 08:49:11 -02:00
em28xx [media] em28xx: fix uninitialized variable warning 2014-10-21 08:51:07 -02:00
go7007 [media] go7007: fix sparse warnings 2014-09-03 09:33:24 -03:00
gspca media updates for v3.18-rc1 2014-10-10 22:04:49 -04:00
hackrf [media] hackrf: Fix a long constant 2014-09-21 20:35:47 -03:00
hdpvr [media] hdpvr: reduce memory footprint when debugging 2014-09-23 16:13:36 -03:00
msi2500 [media] msi2500: remove unneeded spinlock irq flags initialization 2014-09-21 16:42:35 -03:00
pvrusb2 [media] media: pvrusb2: make logging code sane 2014-07-17 20:05:38 -03:00
pwc [media] pwc: fix sparse warning 2014-09-03 09:55:43 -03:00
s2255 [media] s2255drv: fix sparse warning 2014-09-03 09:54:16 -03:00
siano [media] usb drivers: use %zu instead of %zd 2014-09-26 06:51:00 -03:00
stk1160 [media] media: remove the setting of the flag V4L2_FL_USE_FH_PRIO 2014-07-04 16:14:59 -03:00
stkwebcam [media] v4l: Support extending the v4l2_pix_format structure 2014-07-17 12:44:47 -03:00
tlg2300 [media] v4l: Support extending the v4l2_pix_format structure 2014-07-17 12:44:47 -03:00
tm6000 [media] rc-core: rename dev->scanmask to dev->scancode_mask 2014-07-25 19:10:43 -03:00
ttusb-budget media: use pci_zalloc_consistent 2014-08-08 15:57:28 -07:00
ttusb-dec [media] ttusb-dec: buffer overflow in ioctl 2014-09-23 16:13:37 -03:00
usbtv [media] Media: USB: usbtv: Fixed all coding style issues in usbtv source files 2014-09-23 16:13:44 -03:00
usbvision [media] drivers/media/usb/usbvision/usbvision-core.c: Remove useless return variables 2014-07-04 15:35:02 -03:00
uvc [media] v4l: uvcvideo: Fix buffer completion size check 2014-10-21 08:53:27 -02:00
zr364xx [media] v4l: Support extending the v4l2_pix_format structure 2014-07-17 12:44:47 -03:00
Kconfig [media] hackrf: HackRF SDR driver 2014-09-21 20:32:37 -03:00
Makefile [media] hackrf: HackRF SDR driver 2014-09-21 20:32:37 -03:00