android_kernel_oneplus_msm8998/drivers/media/usb/cpia2
Dan Carpenter 8978bc9e74 media: cpia2: Fix a couple off by one bugs
[ Upstream commit d5ac225c7d64c9c3ef821239edc035634e594ec9 ]

The cam->buffers[] array has cam->num_frames elements so the > needs to
be changed to >= to avoid going beyond the end of the array.  The
->buffers[] array is allocated in cpia2_allocate_buffers() if you want
to confirm.

Fixes: ab33d5071d ("V4L/DVB (3376): Add cpia2 camera support")

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-22 09:23:29 +01:00
..
cpia2.h
cpia2_core.c
cpia2_registers.h
cpia2_usb.c [media] media: Change variable type to bool 2013-10-17 11:24:35 -03:00
cpia2_v4l.c media: cpia2: Fix a couple off by one bugs 2018-03-22 09:23:29 +01:00
Kconfig
Makefile