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

Commit 22d3aa35 authored by Tej Singh's avatar Tej Singh Committed by Automerger Merge Worker
Browse files

[RESTRICT AUTOMERGE] Fix OOB write in noteAtomLogged am: b13b741a

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14670131

Change-Id: I705d5c2e025d4e510cd10091e381d8d57f99b78d
parents 9ebf7232 b13b741a
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -449,9 +449,12 @@ void StatsdStats::notePullExceedMaxDelay(int pullAtomId) {
void StatsdStats::noteAtomLogged(int atomId, int32_t timeSec) {
    lock_guard<std::mutex> lock(mLock);

    if (atomId <= android::util::kMaxPushedAtomId) {
    if (atomId >= 0 && atomId <= android::util::kMaxPushedAtomId) {
        mPushedAtomStats[atomId]++;
    } else {
        if (atomId < 0) {
            android_errorWriteLog(0x534e4554, "187957589");
        }
        if (mNonPlatformPushedAtomStats.size() < kMaxNonPlatformPushedAtoms) {
            mNonPlatformPushedAtomStats[atomId]++;
        }