2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-23 04:34:11 +08:00
linux-next/drivers/media/common/videobuf2
Sakari Ailus 14f28f5cea media: videobuf2-dma-sg: Prevent size from overflowing
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>
2019-05-23 10:18:19 -04:00
..
Kconfig media: Remove depends on HAS_DMA in case of platform dependency 2018-05-28 16:17:08 -04:00
Makefile media: vb2: Makefile: place vb2-trace together with vb2-core 2018-02-26 11:39:04 -05:00
vb2-trace.c media: videobuf2: fix build issues with vb2-trace 2018-02-23 05:13:53 -05:00
videobuf2-core.c media: videobuf2-core: Prevent size alignment wrapping buffer size to 0 2019-05-23 10:18:19 -04:00
videobuf2-dma-contig.c videobuf2/videobuf2-dma-sg.c: convert to use vm_map_pages() 2019-05-14 09:47:50 -07:00
videobuf2-dma-sg.c media: videobuf2-dma-sg: Prevent size from overflowing 2019-05-23 10:18:19 -04:00
videobuf2-dvb.c
videobuf2-memops.c media: common: fix several typos 2019-03-01 09:44:48 -05:00
videobuf2-v4l2.c media: videobuf2-v4l2.c: move up STATE_DEQUEUED check 2019-04-22 11:43:00 -04:00
videobuf2-vmalloc.c media: videobuf2: Return error after allocation failure 2019-03-19 14:03:55 -04:00