libcamera/test/camera
Kieran Bingham 1a6b80e4a0 test: camera: buffer_import: clear video pointer
The FrameSink::cleanup() call checks if video_ is set before cleaning up
and then deleting the object.

If the cleanup() call is called twice for any reason, this will
encounter a use-after-free as the video_ pointer is not cleared after
deletion.

Whilst cleanup() is not currently called twice consecutively, to prevent
errors in the future, make it explicit that the object has been deleted
by clearing the stale pointer.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2019-08-01 10:53:04 +01:00
..
buffer_import.cpp test: camera: buffer_import: clear video pointer 2019-08-01 10:53:04 +01:00
camera_test.cpp libcamera: Switch to CameraConfiguration 2019-04-09 16:59:19 +02:00
camera_test.h libcamera: Switch to CameraConfiguration 2019-04-09 16:59:19 +02:00
capture.cpp libcamera: Stop using Stream::bufferPool to get the number of buffers 2019-07-14 16:00:58 +03:00
configuration_default.cpp libcamera: camera: Add a validation API to the CameraConfiguration class 2019-05-23 01:07:38 +03:00
configuration_set.cpp test: camera: Fix initialisation 2019-06-10 12:29:40 +01:00
meson.build test: camera: Add buffer import and mapping test 2019-07-14 16:01:11 +03:00
statemachine.cpp libcamera: buffer: Split memory information to BufferMemory 2019-07-14 16:00:54 +03:00