Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 1a5954c3 authored by Bjoern Johansson's avatar Bjoern Johansson
Browse files

Fix NDK CameraManager crash when no cameras exist

The NDK CameraManager only lists cameras that support camera API v2. For
a device that only supports v1 the list comes back empty. This results
in allocating an array of size zero. This array was then intialized with
a nullptr. This is fine if the array contains at least one item but in
the case where there are no cameras this will cause a buffer overflow.
This change removes the initialization which fixes the crash.

Test: manual - ran camera CTS tests
Change-Id: Ie1c872ff66997d55572fd855f20b56bd58b01752
parent 7f05785d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment