diff options
author | Tyler Luu <tluu@ti.com> | 2011-12-12 15:05:32 -0600 |
---|---|---|
committer | Iliyan Malchev <malchev@google.com> | 2011-12-12 13:29:28 -0800 |
commit | 2ebfacc7fc6c76ea4db6ef96d29f9188177fe106 (patch) | |
tree | 92b25f11ec970dcce120857d7498438914caf42d /camera | |
parent | acad90ed659fc52e188e641f28a67a8203e3bad0 (diff) | |
download | hardware_ti_omap4-2ebfacc7fc6c76ea4db6ef96d29f9188177fe106.zip hardware_ti_omap4-2ebfacc7fc6c76ea4db6ef96d29f9188177fe106.tar.gz hardware_ti_omap4-2ebfacc7fc6c76ea4db6ef96d29f9188177fe106.tar.bz2 |
CameraHal: Add missing null check in OMX3A
Check for null before strcmp
b/5639860
Change-Id: I552213c9894679eeb64cd06419f3f430276b273e
Signed-off-by: Tyler Luu <tluu@ti.com>
Diffstat (limited to 'camera')
-rw-r--r-- | camera/OMXCameraAdapter/OMX3A.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/camera/OMXCameraAdapter/OMX3A.cpp b/camera/OMXCameraAdapter/OMX3A.cpp index ef02e49..5eadc44 100644 --- a/camera/OMXCameraAdapter/OMX3A.cpp +++ b/camera/OMXCameraAdapter/OMX3A.cpp @@ -273,7 +273,7 @@ status_t OMXCameraAdapter::setParameters3A(const CameraParameters ¶ms, OMX_BOOL lock = OMX_FALSE; mUserSetExpLock = OMX_FALSE; str = params.get(CameraParameters::KEY_AUTO_EXPOSURE_LOCK); - if ( (strcmp(str, "true")) == 0) + if (str && ((strcmp(str, "true")) == 0)) { CAMHAL_LOGVA("Locking Exposure"); lock = OMX_TRUE; @@ -298,7 +298,7 @@ status_t OMXCameraAdapter::setParameters3A(const CameraParameters ¶ms, OMX_BOOL lock = OMX_FALSE; mUserSetWbLock = OMX_FALSE; str = params.get(CameraParameters::KEY_AUTO_WHITEBALANCE_LOCK); - if ( (strcmp(str, "true")) == 0) + if (str && ((strcmp(str, "true")) == 0)) { CAMHAL_LOGVA("Locking WhiteBalance"); lock = OMX_TRUE; |