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

Commit 22e91601 authored by Ivan Lozano's avatar Ivan Lozano Committed by Android (Google) Code Review
Browse files

Merge "Fix overflow sanitizer in EffectVisualizer."

parents 14093dd0 cb97d3e5
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;