Skip to content

Commit 1ddb9ee

Browse files
committed
Fix #426 (SnakeYAML upgraded 2.0->2.1)
1 parent cd8605f commit 1ddb9ee

File tree

4 files changed

+13
-5
lines changed

4 files changed

+13
-5
lines changed

release-notes/VERSION-2.x

+8
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,14 @@ Active Maintainers:
1414
=== Releases ===
1515
------------------------------------------------------------------------
1616

17+
2.15.3 (not yet released)
18+
19+
#400: (yaml) `IllegalArgumentException` when attempting to decode invalid UTF-8
20+
surrogate by SnakeYAML (oss-fuzz 50431)
21+
#406: (yaml) NumberFormatException from SnakeYAML due to int overflow for
22+
corrupt YAML version
23+
#426: (yaml) Update to SnakeYAML 2.1
24+
1725
2.15.2 (30-May-2023)
1826

1927
No changes since 2.15.1

yaml/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
<dependency>
3535
<groupId>org.yaml</groupId>
3636
<artifactId>snakeyaml</artifactId>
37-
<version>2.0</version>
37+
<version>2.1</version>
3838
</dependency>
3939

4040
<!-- and for testing need annotations; but should be available via `jackson-databind` above

yaml/src/test/java/com/fasterxml/jackson/dataformat/yaml/failing/FuzzYAMLRead_400_50431Test.java renamed to yaml/src/test/java/com/fasterxml/jackson/dataformat/yaml/deser/FuzzYAMLRead_400_50431Test.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.fasterxml.jackson.dataformat.yaml.failing;
1+
package com.fasterxml.jackson.dataformat.yaml.deser;
22

33
import com.fasterxml.jackson.core.exc.StreamReadException;
44
import com.fasterxml.jackson.databind.ObjectMapper;
@@ -23,7 +23,7 @@ public void testUnicodeDecoding50431() throws Exception
2323
} catch (StreamReadException e) {
2424
// Not sure what to verify, but should be exposed as one of Jackson's
2525
// exceptions (or possibly IOException)
26-
verifyException(e, "Not a valid Unicode code point: 0xE30EEE");
26+
verifyException(e, "found unknown escape character E30EEE");
2727
}
2828
}
2929
}

yaml/src/test/java/com/fasterxml/jackson/dataformat/yaml/failing/FuzzYAMLRead_406_56902Test.java renamed to yaml/src/test/java/com/fasterxml/jackson/dataformat/yaml/deser/FuzzYAMLRead_406_56902Test.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.fasterxml.jackson.dataformat.yaml.failing;
1+
package com.fasterxml.jackson.dataformat.yaml.deser;
22

33
import com.fasterxml.jackson.core.exc.StreamReadException;
44
import com.fasterxml.jackson.databind.ObjectMapper;
@@ -30,7 +30,7 @@ public void testVersionNumberParsing56902() throws Exception
3030
} catch (StreamReadException e) {
3131
// Not sure what to verify, but should be exposed as one of Jackson's
3232
// exceptions (or possibly IOException)
33-
verifyException(e, "Not a valid YAML version");
33+
verifyException(e, "found a number which cannot represent a valid version");
3434
}
3535
}
3636
}

0 commit comments

Comments
 (0)