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

Commit 4bb257b2 authored by Ivan Lozano's avatar Ivan Lozano Committed by android-build-merger
Browse files

Merge "Fix integer overflow sanitizer in FastThread.cpp."

am: 2bfa8f43

Change-Id: Ib32addc5061d7bd8c5b9419edaad77b70c058038
parents db28de61 2bfa8f43
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -297,7 +297,8 @@ bool FastThread::threadLoop()
                    size_t i = mBounds & (mDumpState->mSamplingN - 1);
                    mBounds = (mBounds & 0xFFFF0000) | ((mBounds + 1) & 0xFFFF);
                    if (mFull) {
                        mBounds += 0x10000;
                        //mBounds += 0x10000;
                        __builtin_add_overflow(mBounds, 0x10000, &mBounds);
                    } else if (!(mBounds & (mDumpState->mSamplingN - 1))) {
                        mFull = true;
                    }