diff options
author | Hirokazu Honda <hiroh@chromium.org> | 2020-10-28 17:57:26 +0900 |
---|---|---|
committer | Kieran Bingham <kieran.bingham@ideasonboard.com> | 2020-10-28 15:52:51 +0000 |
commit | 3a777d8cc10bf664c301cf53703f50d71f12b052 (patch) | |
tree | 22e35f89b623982542347b96bc332795cf1ee34b /src/qcam/assets/shader/YUV_packed.frag | |
parent | bfd588d1d8332453b5f7afc6749fc6f3bf00c0bd (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 'src/qcam/assets/shader/YUV_packed.frag')
0 files changed, 0 insertions, 0 deletions