* commit '1d3612f11cb0a56062059dad4643657750c23aab': fix an out-of-bounds memory access
This commit is contained in:
commit
c208cdd402
@ -314,10 +314,12 @@ status_t BufferQueue::dequeueBuffer(int *outBuf, sp<Fence>& outFence,
|
|||||||
* the consumer may still have pending reads of the
|
* the consumer may still have pending reads of the
|
||||||
* buffers in flight.
|
* buffers in flight.
|
||||||
*/
|
*/
|
||||||
bool isOlder = mSlots[i].mFrameNumber <
|
if (found >= 0) {
|
||||||
mSlots[found].mFrameNumber;
|
bool isOlder = mSlots[i].mFrameNumber <
|
||||||
if (found < 0 || isOlder) {
|
mSlots[found].mFrameNumber;
|
||||||
found = i;
|
if (isOlder) {
|
||||||
|
found = i;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user