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

Commit e117ee90 authored by Chad Brubaker's avatar Chad Brubaker Committed by Gerrit Code Review
Browse files

Merge "Fix benign unsigned integer overflows in loop conditions"

parents aaf36e2f 5915ce01
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -949,7 +949,8 @@ ACodec::BufferInfo *ACodec::dequeueBufferFromNativeWindow() {
    }

    BufferInfo *oldest = NULL;
    for (size_t i = mBuffers[kPortIndexOutput].size(); i-- > 0;) {
    for (size_t i = mBuffers[kPortIndexOutput].size(); i > 0;) {
        i--;
        BufferInfo *info =
            &mBuffers[kPortIndexOutput].editItemAt(i);

+2 −1
Original line number Diff line number Diff line
@@ -1350,7 +1350,8 @@ void OMXNodeInstance::removeActiveBuffer(
void OMXNodeInstance::freeActiveBuffers() {
    // Make sure to count down here, as freeBuffer will in turn remove
    // the active buffer from the vector...
    for (size_t i = mActiveBuffers.size(); i--;) {
    for (size_t i = mActiveBuffers.size(); i > 0;) {
        i--;
        freeBuffer(mActiveBuffers[i].mPortIndex, mActiveBuffers[i].mID);
    }
}