Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e73f9cb7 authored by Devin Moore's avatar Devin Moore Committed by Android (Google) Code Review
Browse files

Merge "NotificationHistory validate position value" into tm-dev

parents 397c3769 97c957a0
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -256,6 +256,10 @@ public final class NotificationHistory implements Parcelable {
            mParcel.setDataPosition(0);
            mParcel.appendFrom(data, data.dataPosition(), listByteLength);
            mParcel.setDataSize(mParcel.dataPosition());
            if (positionInParcel > mParcel.dataSize()) {
                throw new IllegalStateException(
                    "Obtained an invalid position value(" + positionInParcel + " from Parcel.");
            }
            mParcel.setDataPosition(positionInParcel);
        }
    }