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

Commit 239c1139 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "aaudio: prevent out-of-bounds read in resampler" into main

parents aa1cee74 aa81dd75
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -28,7 +28,8 @@ SampleRateConverter::SampleRateConverter(int32_t channelCount,

void SampleRateConverter::reset() {
    FlowGraphNode::reset();
    mInputCursor = kInitialCallCount;
    mInputCallCount = kInitialCallCount;
    mInputCursor = 0;
}

// Return true if there is a sample available.
+1 −1
Original line number Diff line number Diff line
@@ -54,7 +54,7 @@ private:
    int32_t mNumValidInputFrames = 0; // number of valid frames currently in the input port buffer
    // We need our own callCount for upstream calls because calls occur at a different rate.
    // This means we cannot have cyclic graphs or merges that contain an SRC.
    int64_t mInputCallCount = 0;
    int64_t mInputCallCount = kInitialCallCount;

};