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