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

Commit c4305aed 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 am: 4bc4f789 am: 7f2592fe
am: dbdf026f

Change-Id: I4d2bba1d77108acad20a8886d79a99f8b521ede3
parents a8305391 dbdf026f
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;