diff options
author | Suhrid Subramaniam <suhrid.subramaniam@mediatek.com> | 2023-03-02 11:06:29 -0800 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2023-03-09 18:40:40 +0200 |
commit | 16546269aa2a725d5fd187eef2dc812bbba43b7a (patch) | |
tree | 5b787c3a592de57556473fe54d98146b569a8ec7 /utils/gen-header.sh | |
parent | 1957219d7e7ca557d6068fb7e46bd29b30211e6a (diff) |
libcamera: converter: Check converter validity
The ConverterFactoryBase::create() function returns a nullptr when no
converter is found. The only caller, SimpleCameraData::init(), checks if
the converter is valid with isValid(), but doesn't check if the pointer
is null, which can lead to a crash.
We could check both pointer validity and converter validity in the
caller, but to limit the complexity in callers, it is better to check
the converter validity in the create() function and return a null
pointer when no valid converter is found.
Signed-off-by: Suhrid Subramaniam <suhrid.subramaniam@mediatek.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'utils/gen-header.sh')
0 files changed, 0 insertions, 0 deletions