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

Commit 78f093a8 authored by Marco Nelissen's avatar Marco Nelissen Committed by Android (Google) Code Review
Browse files

Merge "Fix out of bounds access"

parents c4bda3ad 62d719f0
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -117,9 +117,14 @@ void SoftMPEG4::onQueueFilled(OMX_U32 /* portIndex */) {
                outHeader->nFlags = OMX_BUFFERFLAG_EOS;

                List<BufferInfo *>::iterator it = outQueue.begin();
                while ((*it)->mHeader != outHeader) {
                while (it != outQueue.end() && (*it)->mHeader != outHeader) {
                    ++it;
                }
                if (it == outQueue.end()) {
                    ALOGE("couldn't find port buffer %d in outQueue: b/109891727", mNumSamplesOutput & 1);
                    android_errorWriteLog(0x534e4554, "109891727");
                    return;
                }

                BufferInfo *outInfo = *it;
                outInfo->mOwnedByUs = false;