Merge "StrictMode: fix deserialization of ViolationInfo on large stacks"
am: 29e0b6e789
* commit '29e0b6e7891091614a9e9dd6083017d0c9d454ae':
StrictMode: fix deserialization of ViolationInfo on large stacks
diff --git a/core/java/android/os/StrictMode.java b/core/java/android/os/StrictMode.java
index 87ce12c..58d4d09 100644
--- a/core/java/android/os/StrictMode.java
+++ b/core/java/android/os/StrictMode.java
@@ -1931,9 +1931,9 @@
// so we'll report it and bail on all of the current strict mode violations
// we currently are maintaining for this thread.
// First, drain the remaining violations from the parcel.
- while (i < numViolations) {
+ i++; // Skip the current entry.
+ for (; i < numViolations; i++) {
info = new ViolationInfo(p, !currentlyGathering);
- i++;
}
// Next clear out all gathered violations.
clearGatheredViolations();