We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 274fa48 commit 5bff1beCopy full SHA for 5bff1be
csv/src/main/java/com/fasterxml/jackson/dataformat/csv/impl/UTF8Reader.java
@@ -403,6 +403,17 @@ private boolean loadMore(int available) throws IOException
403
// Bytes that need to be moved to the beginning of buffer?
404
if (available > 0) {
405
if (_inputPtr > 0) {
406
+ if (!canModifyBuffer()) {
407
+ // 15-Aug-2022, tatu: Occurs (only) if we have half-decoded UTF-8
408
+ // characters; uncovered by:
409
+ //
410
+ // https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=50036
411
412
+ // _inputBuffer needs to be cloned to avoid modifying original
413
+ if (_inputSource == null) {
414
+ _inputBuffer = _inputBuffer.clone();
415
+ }
416
417
for (int i = 0; i < available; ++i) {
418
_inputBuffer[i] = _inputBuffer[_inputPtr+i];
419
}
0 commit comments