We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d0b9445 commit e6bb0f6Copy full SHA for e6bb0f6
src/main/java/tools/jackson/core/io/UTF32Reader.java
@@ -114,10 +114,13 @@ public int read() throws IOException {
114
public int read(char[] cbuf, int start, int len) throws IOException
115
{
116
Objects.requireNonNull(cbuf, "cbuf");
117
- Objects.checkFromIndexSize(start, len, cbuf.length);
118
// Already EOF?
119
if (_buffer == null) { return -1; }
120
if (len < 1) { return len; }
+ // Let's then ensure there's enough room...
121
+ if (start < 0 || len < 0 || start > (cbuf.length - len)) {
122
+ reportBounds(cbuf, start, len);
123
+ }
124
125
int outPtr = start;
126
final int outEnd = len+start;
0 commit comments