Merge "Update Parcel readLazyValue to ignore negative object lengths" into tm-dev
This commit is contained in:
@@ -4388,6 +4388,9 @@ public final class Parcel {
|
|||||||
int type = readInt();
|
int type = readInt();
|
||||||
if (isLengthPrefixed(type)) {
|
if (isLengthPrefixed(type)) {
|
||||||
int objectLength = readInt();
|
int objectLength = readInt();
|
||||||
|
if (objectLength < 0) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
int end = MathUtils.addOrThrow(dataPosition(), objectLength);
|
int end = MathUtils.addOrThrow(dataPosition(), objectLength);
|
||||||
int valueLength = end - start;
|
int valueLength = end - start;
|
||||||
setDataPosition(end);
|
setDataPosition(end);
|
||||||
|
|||||||
Reference in New Issue
Block a user