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

Commit da857bd9 authored by Jesse Wilson's avatar Jesse Wilson Committed by Android (Google) Code Review
Browse files

Merge "Fix benign off-by-one in JsonReader."

parents 8a42a557 d1ad3c2c
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -852,7 +852,7 @@ public final class JsonReader implements Closeable {

    private boolean skipTo(String toFind) throws IOException {
        outer:
        for (; pos + toFind.length() < limit || fillBuffer(toFind.length()); pos++) {
        for (; pos + toFind.length() <= limit || fillBuffer(toFind.length()); pos++) {
            for (int c = 0; c < toFind.length(); c++) {
                if (buffer[pos + c] != toFind.charAt(c)) {
                    continue outer;