anolis-cloud-kernel/drivers/media/common
Sakari Ailus 87bae91a0f media: videobuf2-dma-sg: Prevent size from overflowing
commit 14f28f5cea upstream.

buf->size is an unsigned long; casting that to int will lead to an
overflow if buf->size exceeds INT_MAX.

Fix this by changing the type to unsigned long instead. This is possible
as the buf->size is always aligned to PAGE_SIZE, and therefore the size
will never have values lesser than 0.

Note on backporting to stable: the file used to be under
drivers/media/v4l2-core, it was moved to the current location after 4.14.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: stable@vger.kernel.org
Reviewed-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-26 09:14:24 +02:00
..
b2c2 media: lgdt330x: convert it to the new I2C binding way 2018-05-04 11:09:26 -04:00
saa7146 media: saa7146: fix error return from master_xfer 2018-05-11 11:30:57 -04:00
siano siano: get rid of an unused return code for debugfs register 2018-08-08 10:57:14 -04:00
v4l2-tpg media: v4l2-tpg: array index could become negative 2019-01-09 17:38:47 +01:00
videobuf2 media: videobuf2-dma-sg: Prevent size from overflowing 2019-07-26 09:14:24 +02:00
Kconfig media: drivers/media/common/videobuf2: rename from videobuf 2018-01-23 08:05:02 -05:00
Makefile media: drivers/media/common/videobuf2: rename from videobuf 2018-01-23 08:05:02 -05:00
btcx-risc.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
cx2341x.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
cypress_firmware.c media: drivers: improve a size determination 2017-09-23 08:20:57 -04:00
cypress_firmware.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
tveeprom.c [media] tveeprom: get rid of unused arg on tveeprom_hauppauge_analog() 2017-03-03 07:35:02 -03:00