Merge "Fix integer overflow sanitizer in FastThread.cpp."
diff --git a/services/audioflinger/FastThread.cpp b/services/audioflinger/FastThread.cpp
index 85865b7..dc15487 100644
--- a/services/audioflinger/FastThread.cpp
+++ b/services/audioflinger/FastThread.cpp
@@ -297,7 +297,8 @@
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;
}