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

Commit e6b9af44 authored by Suman Mukherjee's avatar Suman Mukherjee Committed by Ethan Chen
Browse files

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
parent 53b672b2
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -341,6 +341,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;