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

Commit e5394408 authored by Andy Hung's avatar Andy Hung Committed by android-build-merger
Browse files

Merge "EffectReverb: Fix unsigned integer overflow" into pi-dev am: b60d788a

am: c1e81a0b

Change-Id: I4586101841178090e03236a4b4b1424bbe5849ee
parents 87546c5c c1e81a0b
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1966,7 +1966,8 @@ int Reverb_process(effect_handle_t self,

    if (pContext->bEnabled == LVM_FALSE) {
        if (pContext->SamplesToExitCount > 0) {
            pContext->SamplesToExitCount -= outBuffer->frameCount;
            // signed - unsigned will trigger integer overflow if result becomes negative.
            pContext->SamplesToExitCount -= (ssize_t)outBuffer->frameCount;
        } else {
            status = -ENODATA;
        }