diff options
author | Steve Kondik <shade@chemlab.org> | 2013-05-01 02:58:11 -0700 |
---|---|---|
committer | Steve Kondik <shade@chemlab.org> | 2013-05-01 02:58:11 -0700 |
commit | 6940b4572becf672c018a77ab9f8c00c13a3ca99 (patch) | |
tree | 782621a243c4e7aa6f61397e3d2caf4f09c34e6c /camera | |
parent | 8589aa8043d929f2d09400e9d30cb96b7bbc63bb (diff) | |
download | frameworks_av-6940b4572becf672c018a77ab9f8c00c13a3ca99.zip frameworks_av-6940b4572becf672c018a77ab9f8c00c13a3ca99.tar.gz frameworks_av-6940b4572becf672c018a77ab9f8c00c13a3ca99.tar.bz2 |
camera: Don't segfault if we get a NULL parameter
* Values end up NULL on some drivers, don't crash.
Change-Id: Ic897dbd4629cf3af98c85f93be202c382dde806b
Diffstat (limited to 'camera')
-rw-r--r-- | camera/CameraParameters.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/camera/CameraParameters.cpp b/camera/CameraParameters.cpp index e65d219..d86e0f3 100644 --- a/camera/CameraParameters.cpp +++ b/camera/CameraParameters.cpp @@ -520,6 +520,9 @@ void CameraParameters::unflatten(const String8 ¶ms) void CameraParameters::set(const char *key, const char *value) { + if (key == NULL || value == NULL) + return; + // XXX i think i can do this with strspn() if (strchr(key, '=') || strchr(key, ';')) { //XXX ALOGE("Key \"%s\"contains invalid character (= or ;)", key); |