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

Commit 4bc4f789 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:...

Merge "Add bounds check in SoftAACEncoder2::onQueueFilled()" into klp-dev am: 19b91af7 am: 8e3cf4d8 am: 5b1bfc1f
am: 8abf11b5

Change-Id: I1cdf8344d8ca41cf5c4b6622ec743bb094c3dff0
parents 8655d4fc 8abf11b5
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -479,6 +479,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;