Merge "Fix out-of-bounds write past end of buckets on long transactions"
diff --git a/libs/binder/tests/binderThroughputTest.cpp b/libs/binder/tests/binderThroughputTest.cpp
index b790997..3b1faa8 100644
--- a/libs/binder/tests/binderThroughputTest.cpp
+++ b/libs/binder/tests/binderThroughputTest.cpp
@@ -116,7 +116,7 @@
if (time > max_time_bucket) {
m_long_transactions++;
}
- m_buckets[min(time, max_time_bucket-1) / time_per_bucket] += 1;
+ m_buckets[min((uint32_t)(time / time_per_bucket), num_buckets - 1)] += 1;
m_best = min(time, m_best);
m_worst = max(time, m_worst);
m_transactions += 1;