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

Commit 8e3cf4d8 authored by Ray Essick's avatar Ray Essick Committed by android-build-merger
Browse files

Merge "Add bounds check in SoftAACEncoder2::onQueueFilled()" into klp-dev

am: 19b91af7

Change-Id: I83ad1fa809b82d1b4a6158b66ebffc5ae1d35590
parents dcda2ec2 19b91af7
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -406,6 +406,15 @@ void SoftAACEncoder2::onQueueFilled(OMX_U32 portIndex) {

        BufferInfo *outInfo = *outQueue.begin();
        OMX_BUFFERHEADERTYPE *outHeader = outInfo->mHeader;

        if (outHeader->nOffset + encInfo.confSize > outHeader->nAllocLen) {
            ALOGE("b/34617444");
            android_errorWriteLog(0x534e4554,"34617444");
            notify(OMX_EventError, OMX_ErrorUndefined, 0, NULL);
            mSignalledError = true;
            return;
        }

        outHeader->nFilledLen = encInfo.confSize;
        outHeader->nFlags = OMX_BUFFERFLAG_CODECCONFIG;