diff options
author | Mattijs Korpershoek <mkorpershoek@baylibre.com> | 2023-04-05 10:14:30 +0200 |
---|---|---|
committer | Kieran Bingham <kieran.bingham@ideasonboard.com> | 2023-04-20 10:54:12 +0100 |
commit | 3dc2605bda52b627f6e009ef4a3c8360d00e358a (patch) | |
tree | 78a2ec5261aeaedeb418c0af05d9e11c6ddd1694 /utils/rkisp1 | |
parent | 46852241a34066026e480d928d57da9cdb02b1bf (diff) |
libcamera: controls: guard ControlInfoMap against nullptr idmap_
It's possible to construct a Camera with an unsafe controlInfo_.
This is the case in the Simple pipeline, where the camera controls are
not populated.
With Simple, if we attempt to set a Control, we end up with a segfault
because the default constructor for ControlInfoMap doesn't
intialized idmap_ which is initialized at class declaration time as
const ControlIdMap *idmap_ = nullptr;
Add some safeguards in ControlInfoMap to handle this case.
Link: https://lists.libcamera.org/pipermail/libcamera-devel/2023-April/037439.html
Suggested-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'utils/rkisp1')
0 files changed, 0 insertions, 0 deletions