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

Commit 8ccca289 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "[RESTRICT AUTOMERGE] Fix OOB write in noteAtomLogged" into rvc-dev

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

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