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

Commit 8abf11b5 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

Change-Id: I32327162d3e69259656f0b3a82800f45572527fd
parents c3de266a 5b1bfc1f
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;