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

Commit f01e4af5 authored by John Reck's avatar John Reck Committed by Android (Google) Code Review
Browse files

Merge "Fix array out of bounds access in JankTracker" into nyc-dev

parents 89d9480b d6e3cf4a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -244,7 +244,7 @@ void JankTracker::addFrame(const FrameInfo& frame) {
    int64_t totalDuration =
            frame[FrameInfoIndex::FrameCompleted] - frame[FrameInfoIndex::IntendedVsync];
    uint32_t framebucket = frameCountIndexForFrameTime(
            totalDuration, mData->frameCounts.size());
            totalDuration, mData->frameCounts.size() - 1);
    // Keep the fast path as fast as possible.
    if (CC_LIKELY(totalDuration < mFrameInterval)) {
        mData->frameCounts[framebucket]++;