summaryrefslogtreecommitdiff
path: root/test/v4l2_videodevice/v4l2_videodevice_test.h
diff options
context:
space:
mode:
authorHirokazu Honda <hiroh@chromium.org>2020-10-28 17:57:26 +0900
committerKieran Bingham <kieran.bingham@ideasonboard.com>2020-10-28 15:52:51 +0000
commit3a777d8cc10bf664c301cf53703f50d71f12b052 (patch)
tree22e35f89b623982542347b96bc332795cf1ee34b /test/v4l2_videodevice/v4l2_videodevice_test.h
parentbfd588d1d8332453b5f7afc6749fc6f3bf00c0bd (diff)
android: camera_device: Fix crash of accessing a missing map element
std::map::at() searches std::map by the given key. The commit e1f9fdb8a5bd ("android: camera_device: Remove shadowing FrameBuffer usage") uses it with 0 to intend to accessing the first element of the map, but actually access the element whose key is nullptr. This causes the crash because the map doesn't have the element with nullptr. This fixes the issue by replacing the std::map::at() operation by std::map::begin(). Signed-off-by: Hirokazu Honda <hiroh@chromium.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> [Kieran: Updated commit message] Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'test/v4l2_videodevice/v4l2_videodevice_test.h')
0 files changed, 0 insertions, 0 deletions