Merge "Check for invalid (negative) string pool pos." into sc-dev am: 59bad728e2 am: bb0bd225a1

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15390628

Change-Id: I20f2eabdf8b9cbfd8d0f9e6436d5890eebefe5eb
This commit is contained in:
Alex Buynytskyy
2021-07-27 15:13:40 +00:00
committed by Automerger Merge Worker

View File

@@ -56,6 +56,9 @@ public class PackageParserCacheHelper {
mStrings.clear();
final int poolPosition = mParcel.readInt();
if (poolPosition < 0) {
throw new IllegalStateException("Invalid string pool position: " + poolPosition);
}
final int startPosition = mParcel.dataPosition();
// The pool is at the end of the parcel.