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

Commit 0775a95c 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

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

Change-Id: I7a999da1b8cafe96b5739f1361be7428ffc26b80
parents af13fd06 f01e4af5
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]++;