Merge "Check for invalid (negative) string pool pos." into sc-dev am: 59bad728e2
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15390628 Change-Id: Idcdd73f51cab13a188cf6391954662a3c74243b9
This commit is contained in:
@@ -56,6 +56,9 @@ public class PackageParserCacheHelper {
|
|||||||
mStrings.clear();
|
mStrings.clear();
|
||||||
|
|
||||||
final int poolPosition = mParcel.readInt();
|
final int poolPosition = mParcel.readInt();
|
||||||
|
if (poolPosition < 0) {
|
||||||
|
throw new IllegalStateException("Invalid string pool position: " + poolPosition);
|
||||||
|
}
|
||||||
final int startPosition = mParcel.dataPosition();
|
final int startPosition = mParcel.dataPosition();
|
||||||
|
|
||||||
// The pool is at the end of the parcel.
|
// The pool is at the end of the parcel.
|
||||||
|
|||||||
Reference in New Issue
Block a user