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

Commit 8fbcc6b4 authored by Calin Juravle's avatar Calin Juravle
Browse files

Fixed a possible infinite loop in JsonReader#skipValue()

Bug: https://code.google.com/p/android/issues/detail?id=65846

Change-Id: Idaa0e75fc5612550c4b9ccb9afa5535ea5b189df
parent a14d9c31
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -546,6 +546,9 @@ public final class JsonReader implements Closeable {
    public void skipValue() throws IOException {
        skipping = true;
        try {
            if (!hasNext() || peek() == JsonToken.END_DOCUMENT) {
                throw new IllegalStateException("No element left to skip");
            }
            int count = 0;
            do {
                JsonToken token = advance();