diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2020-10-21 05:02:59 +0300 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2020-11-07 20:24:31 +0200 |
commit | e9463449049c78b6b1c61410082a5339338b2e81 (patch) | |
tree | 1ea8c21e8b356a803af1845d5f75e58bfae782a2 /src/qcam/assets/feathericons/corner-left-up.svg | |
parent | 2d43b8bcd8571dbce1969fa1fd50c655585f780b (diff) |
libcamera: v4l2_videodevice: Check plane count when setting format
When setting (or trying) a format with a multiplanar device, the
V4L2VideoDevice::trySetFormatMeta() function iterates over all planes
available in the V4L2DeviceFormat structure. The caller is responsible
for setting the plane count, and failure to do so properly may result in
memory corruption. This can lead to a crash way after the function
returns, making the problem difficult to debug.
As the issue is caused by a bug in the caller, use an assertion to catch
it.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'src/qcam/assets/feathericons/corner-left-up.svg')
0 files changed, 0 insertions, 0 deletions