diff options
author | Tomi Valkeinen <tomi.valkeinen@iki.fi> | 2020-10-07 12:22:36 +0300 |
---|---|---|
committer | Kieran Bingham <kieran.bingham@ideasonboard.com> | 2020-10-12 16:15:08 +0100 |
commit | 8e6ca49687d2e10b08f024f1a4f4b384be29987b (patch) | |
tree | 6ead6660c4645024353622f8ccc8a3d0a226afb3 /test/span.cpp | |
parent | 265daf6e595a390acaf1bc76207366ad774b7f6c (diff) |
cam: options: fix access to uninit variable
operator[] doesn't check if the option exists in the values_ map, so it
can return a pointer to location outside the map.
Fix by returning an empty OptionValue if the option is not found.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@iki.fi>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
[Kieran: Adjust s_empty naming to 'empty']
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'test/span.cpp')
0 files changed, 0 insertions, 0 deletions