Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions toml/src/main/jflex/skeleton-toml
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,11 @@

/* first: make room (if you can) */
if (zzStartRead > 0) {
zzEndRead += zzFinalHighSurrogate;
zzFinalHighSurrogate = 0;
// JACKSON: check bounds before modifying zzEndRead (jackson-dataformats-text#411)
if (zzEndRead < zzBuffer.length - zzFinalHighSurrogate) {
zzEndRead += zzFinalHighSurrogate;
zzFinalHighSurrogate = 0;
}
System.arraycopy(zzBuffer, zzStartRead,
zzBuffer, 0,
zzEndRead - zzStartRead);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public void testArrayCopy57237() throws Exception
Assert.fail("Should not pass");
} catch (IOException e) {
// Possibly not what we should get; tweak once working
verifyException(e, "EOF in wrong state");
verifyException(e, "Premature end of file");
}
}
}
Expand Down