File tree 3 files changed +2
-18
lines changed
main/java/com/fasterxml/jackson/dataformat/csv/impl
test/java/com/fasterxml/jackson/dataformat/csv/deser
3 files changed +2
-18
lines changed Original file line number Diff line number Diff line change @@ -403,19 +403,6 @@ private boolean loadMore(int available) throws IOException
403
403
// Bytes that need to be moved to the beginning of buffer?
404
404
if (available > 0 ) {
405
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
- // and need to be reported as IOException
413
- if (_inputSource == null ) {
414
- throw new IOException (String .format (
415
- "End-of-input after first %d byte(s) of a UTF-8 character: needed at least one more" ,
416
- available ));
417
- }
418
- }
419
406
for (int i = 0 ; i < available ; ++i ) {
420
407
_inputBuffer [i ] = _inputBuffer [_inputPtr +i ];
421
408
}
Original file line number Diff line number Diff line change @@ -25,8 +25,7 @@ public void testUTF8Decoding50036() throws Exception
25
25
CSV_MAPPER .readTree (INPUT );
26
26
fail ("Should not pass" );
27
27
} catch (IOException e ) {
28
- verifyException (e , "End-of-input after first 1 byte" );
29
- verifyException (e , "of a UTF-8 character" );
28
+ verifyException (e , "Unexpected EOF in the middle of a multi-byte UTF-8 character" );
30
29
}
31
30
}
32
31
Original file line number Diff line number Diff line change 1
- package com .fasterxml .jackson .dataformat .csv .tofix ;
1
+ package com .fasterxml .jackson .dataformat .csv .deser ;
2
2
3
3
import java .io .ByteArrayInputStream ;
4
4
import java .nio .charset .StandardCharsets ;
8
8
import com .fasterxml .jackson .databind .JsonNode ;
9
9
import com .fasterxml .jackson .dataformat .csv .CsvMapper ;
10
10
import com .fasterxml .jackson .dataformat .csv .ModuleTestBase ;
11
- import com .fasterxml .jackson .dataformat .csv .testutil .failure .JacksonTestFailureExpected ;
12
11
13
12
import static org .junit .jupiter .api .Assertions .*;
14
13
@@ -18,7 +17,6 @@ public class UnicodeCSVRead497Test extends ModuleTestBase
18
17
private final CsvMapper MAPPER = mapperForCsv ();
19
18
20
19
// [dataformats-text#497]
21
- @ JacksonTestFailureExpected
22
20
@ Test
23
21
public void testUnicodeAtEnd () throws Exception
24
22
{
You can’t perform that action at this time.
0 commit comments