summaryrefslogtreecommitdiff
path: root/test/v4l2_videodevice/v4l2_videodevice_test.h
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-07-07 04:02:07 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-07-22 17:13:32 +0300
commit3c636755607919bc99b2219683a402660740f0db (patch)
tree625031b6a403c40c79840062d6bef662ba67de3c /test/v4l2_videodevice/v4l2_videodevice_test.h
parent11298f3d47f6a600c63428d660c00a69c32f4b9f (diff)
cam: options: Avoid copies of OptionvValue and KeyValueParser::Options
The OptionValue toKeyValues() and toArray() functions return a copy of the values. This is unnecessary, and can cause use-after-free issues when taking references to the return values. Return references instead to optimize the implementation and avoid issues. The behaviour of the two functions is now undefined in case of an option type mismatch. The current implementation catches this with an assertion. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'test/v4l2_videodevice/v4l2_videodevice_test.h')
0 files changed, 0 insertions, 0 deletions