diff options
author | Suman Mukherjee <sumam@codeaurora.org> | 2015-01-12 12:35:11 +0530 |
---|---|---|
committer | Steve Kondik <steve@cyngn.com> | 2015-10-30 04:13:43 -0700 |
commit | 9c96b1d340c586133eecfad0fc15e62d6669c324 (patch) | |
tree | 8fa73ef8e9314aab041d6b83cecded132241f6d9 /services/camera/libcameraservice/device1 | |
parent | 7623a6547c0d8446a2d2556b360b8b06276ade02 (diff) | |
download | frameworks_av-9c96b1d340c586133eecfad0fc15e62d6669c324.zip frameworks_av-9c96b1d340c586133eecfad0fc15e62d6669c324.tar.gz frameworks_av-9c96b1d340c586133eecfad0fc15e62d6669c324.tar.bz2 |
Camera: Added null check for memory reference
Null memory reference in releaseRecordingFrame will cause
crash in cfuzz tool.
Added Null check for memory reference
Change-Id: Id15fc55cc89b6039a36c1c3c7e4b55c0ae5aa296
Diffstat (limited to 'services/camera/libcameraservice/device1')
-rw-r--r-- | services/camera/libcameraservice/device1/CameraHardwareInterface.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/services/camera/libcameraservice/device1/CameraHardwareInterface.h b/services/camera/libcameraservice/device1/CameraHardwareInterface.h index d9b8609..35947a9 100644 --- a/services/camera/libcameraservice/device1/CameraHardwareInterface.h +++ b/services/camera/libcameraservice/device1/CameraHardwareInterface.h @@ -325,6 +325,10 @@ public: void releaseRecordingFrame(const sp<IMemory>& mem) { ALOGV("%s(%s)", __FUNCTION__, mName.string()); + if (mem == NULL) { + ALOGE("%s: NULL memory reference", __FUNCTION__); + return; + } if (mDevice->ops->release_recording_frame) { ssize_t offset; size_t size; |