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

Commit e95c97f4 authored by John Reck's avatar John Reck Committed by android-build-merger
Browse files

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

am: 0775a95c

* commit '0775a95c':
  Fix array out of bounds access in JankTracker

Change-Id: I076f82b0011ec168d5729a1f80e8059cde71273e
parents ef633fed 0775a95c
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]++;