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

Commit 1524707b authored by Ivan Lozano's avatar Ivan Lozano Committed by android-build-merger
Browse files

Merge "Fix overflow sanitizer in EffectVisualizer."

am: d5285db0

Change-Id: I430896cefb9be2d36efb51b81059883bd9ff6743
parents 0cea54bd d5285db0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -594,7 +594,7 @@ int Visualizer_command(effect_handle_t self, uint32_t cmdCode, uint32_t cmdSize,
                    deltaSmpl = CAPTURE_BUF_SIZE;
                }

                int32_t capturePoint = pContext->mCaptureIdx - deltaSmpl;
                int32_t capturePoint = (int32_t)pContext->mCaptureIdx - deltaSmpl;
                // a negative capturePoint means we wrap the buffer.
                if (capturePoint < 0) {
                    uint32_t size = -capturePoint;