File tree 2 files changed +28
-0
lines changed
java/com/fasterxml/jackson/dataformat/xml/fuzz
2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change
1
+ package com .fasterxml .jackson .dataformat .xml .fuzz ;
2
+
3
+ import com .fasterxml .jackson .core .exc .StreamReadException ;
4
+ import com .fasterxml .jackson .dataformat .xml .XmlMapper ;
5
+ import com .fasterxml .jackson .dataformat .xml .XmlTestBase ;
6
+
7
+ // [dataformat-xml#???]
8
+ // (but root cause of https://github.com/FasterXML/woodstox/issues/125)
9
+ //
10
+ // NOTE! Not reproducible for some reason with these settings (probably
11
+ // has different buffer sizes or... something
12
+ public class FuzzXXX_32969_UTF32Test extends XmlTestBase
13
+ {
14
+ private final XmlMapper MAPPER = newMapper ();
15
+
16
+ public void testUTF32 () throws Exception
17
+ {
18
+ final byte [] doc = readResource ("/data/fuzz-32906.xml" );
19
+ try {
20
+ MAPPER .readTree (doc , 0 , doc .length );
21
+ fail ("Should not pass" );
22
+ } catch (StreamReadException e ) {
23
+ verifyException (e , "Unexpected EOF in CDATA" );
24
+ } catch (RuntimeException e ) {
25
+ fail ("Should fail with specific `StreamReadException` but got: " +e );
26
+ }
27
+ }
28
+ }
You can’t perform that action at this time.
0 commit comments