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

Commit 2ad7f9b1 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 am: c4305aed
am: 1baad9ad

Change-Id: If99804d172112b671974d84d29ac61fe8bf885d8
parents ae7fae18 1baad9ad
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;