diff options
author | Naushir Patuck <naush@raspberrypi.com> | 2023-09-14 10:27:56 +0100 |
---|---|---|
committer | Jacopo Mondi <jacopo.mondi@ideasonboard.com> | 2023-09-16 17:33:44 +0200 |
commit | 90e0fea6c6ba6294bf9438d37d74676cc53ef924 (patch) | |
tree | 4e3fedd9b2012b675d8e54113e9bf914c720d8a3 /src/v4l2/v4l2_compat_manager.cpp | |
parent | 7127954aaa5fe9938743cbc41a328027697aba8a (diff) |
ipa: rpi: Fix segfault when parsing invalid json file
If the json file parsing failed due to a malformed file, the root
pointer would be null. This was not tested and caused a segfault when
trying to use the pointer to retrieve the version key.
Fix this by bailing out early if the parser returns a null pointer.
Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Diffstat (limited to 'src/v4l2/v4l2_compat_manager.cpp')
0 files changed, 0 insertions, 0 deletions