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

Commit c40fcb01 authored by Chien-Yu Chen's avatar Chien-Yu Chen Committed by Android (Google) Code Review
Browse files

Merge "Camera: validate input in releaseRecordingFrame" into nyc-dev

parents 7f7052f5 42f2707b
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -479,6 +479,12 @@ void CameraClient::stopRecording() {
void CameraClient::releaseRecordingFrame(const sp<IMemory>& mem) {
    Mutex::Autolock lock(mLock);
    if (checkPidAndHardware() != NO_ERROR) return;
    if (mem == nullptr) {
        android_errorWriteWithInfoLog(CameraService::SN_EVENT_LOG_ID, "26164272",
                IPCThreadState::self()->getCallingUid(), nullptr, 0);
        return;
    }

    mHardware->releaseRecordingFrame(mem);
}