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

Commit b60d788a authored by Andy Hung's avatar Andy Hung Committed by Android (Google) Code Review
Browse files

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

parents 8a21f4aa 361155ac
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;
        }