kernel-ark/drivers/media
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
..
common [media] saa7146: Create a device name before it's used 2014-10-21 08:51:44 -02:00
dvb-core [media] dvb_frontend: Fix __user namespace 2014-09-26 06:47:52 -03:00
dvb-frontends media updates for v3.18-rc1 2014-10-10 22:04:49 -04:00
firewire [media] firewire: firedtv-avc: fix more potential buffer overflow 2014-09-23 16:13:39 -03:00
i2c Merge branch 'patchwork' into v4l_for_linus 2014-10-09 14:00:54 -03:00
mmc
parport [media] pms: Fix a bad usage of the stack 2014-09-26 06:47:55 -03:00
pci Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2014-10-07 21:16:26 -04:00
platform [media] vivid: fix buffer overrun 2014-10-21 08:52:11 -02:00
radio Merge branch 'patchwork' into v4l_for_linus 2014-10-09 14:00:54 -03:00
rc media updates for v3.18-rc1 2014-10-10 22:04:49 -04:00
tuners [media] qm1d1c0042: fix compilation on 32 bits 2014-09-26 06:47:42 -03:00
usb [media] v4l: uvcvideo: Fix buffer completion size check 2014-10-21 08:53:27 -02:00
v4l2-core media updates for v3.18-rc1 2014-10-10 22:04:49 -04:00
Kconfig [media] Kconfig: do not select SPI bus on sub-driver auto-select 2014-09-04 12:18:49 -03:00
Makefile
media-device.c [media] media: Use strlcpy instead of custom code 2014-09-21 20:27:08 -03:00
media-devnode.c [media] media-devnode: just return 0 instead of using a var 2014-09-03 17:59:28 -03:00
media-entity.c [media] media: Check for active links on pads with MEDIA_PAD_FL_MUST_CONNECT flag 2013-12-04 15:03:45 -02:00