diff options
author | Eino-Ville Talvala <etalvala@google.com> | 2014-05-12 17:27:54 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2014-05-12 17:27:54 +0000 |
commit | f02f06c422a58ddaca49d14f21a196eaa435d07b (patch) | |
tree | f2f226f3cae08f71d0c78ef2e47e023645caf0ca /services/camera | |
parent | 1d2909b38f76d9d866e61cf505b88518d3a52acf (diff) | |
parent | c90f4c7c5838e4dee2f550c4d581e7205e666faa (diff) | |
download | frameworks_av-f02f06c422a58ddaca49d14f21a196eaa435d07b.zip frameworks_av-f02f06c422a58ddaca49d14f21a196eaa435d07b.tar.gz frameworks_av-f02f06c422a58ddaca49d14f21a196eaa435d07b.tar.bz2 |
Merge "camera: check Intent entry count before reading it"
Diffstat (limited to 'services/camera')
-rw-r--r-- | services/camera/libcameraservice/api1/client2/Parameters.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/services/camera/libcameraservice/api1/client2/Parameters.cpp b/services/camera/libcameraservice/api1/client2/Parameters.cpp index 0cceb76..6c2872a 100644 --- a/services/camera/libcameraservice/api1/client2/Parameters.cpp +++ b/services/camera/libcameraservice/api1/client2/Parameters.cpp @@ -1750,6 +1750,9 @@ status_t Parameters::updateRequest(CameraMetadata *request) const { camera_metadata_entry_t intent = request->find(ANDROID_CONTROL_CAPTURE_INTENT); + + if (intent.count == 0) return BAD_VALUE; + if (intent.data.u8[0] == ANDROID_CONTROL_CAPTURE_INTENT_STILL_CAPTURE) { res = request->update(ANDROID_CONTROL_AE_TARGET_FPS_RANGE, fastInfo.bestStillCaptureFpsRange, 2); |