libcamera: pipeline: ipu3: Prevent unintialised memory use
The call to setFormat uses uninitialised data, which, could cause unwanted effects. It is also trapped and reported by valgrind. Initialise the V4L2SubdeviceFormat structure correctly before use. Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Acked-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
@@ -846,7 +846,7 @@ int PipelineHandlerIPU3::initControls(IPU3CameraData *data)
|
||||
*/
|
||||
|
||||
/* Re-fetch the sensor info updated to use the largest resolution. */
|
||||
V4L2SubdeviceFormat sensorFormat;
|
||||
V4L2SubdeviceFormat sensorFormat = {};
|
||||
sensorFormat.size = sensor->resolution();
|
||||
ret = sensor->setFormat(&sensorFormat);
|
||||
if (ret)
|
||||
|
||||
Reference in New Issue
Block a user