-
-
Notifications
You must be signed in to change notification settings - Fork 819
Closed
Milestone
Description
I am invoking writeString(myReader, -1) on a JsonGenerator and get this error sometimes.
java.lang.ArrayIndexOutOfBoundsException: Index 4000 out of bounds for length 4000
at com.fasterxml.jackson.core.json.WriterBasedJsonGenerator.writeString(WriterBasedJsonGenerator.java:466) ~[jackson-core-2.12.0.jar:2.12.0]
jackson-core/src/main/java/com/fasterxml/jackson/core/json/WriterBasedJsonGenerator.java
Lines 462 to 470 in 3c386bf
| //Add trailing quote | |
| if ((_outputTail + len) >= _outputEnd) { | |
| _flushBuffer(); | |
| } | |
| _outputBuffer[_outputTail++] = _quoteChar; | |
| if (toRead > 0 && len >= 0) { | |
| _reportError("Didn't read enough from reader"); | |
| } |
Basically, we need to add this case to the line
(_outputTail + len) >= _outputEnd
Metadata
Metadata
Assignees
Labels
No labels