-
-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add failing test for #236 (in 2.11 in case we can add fix there)
- Loading branch information
1 parent
b38679f
commit a13523f
Showing
5 changed files
with
22 additions
and
10 deletions.
There are no files selected for viewing
3 changes: 0 additions & 3 deletions
3
avro/src/test/java/com/fasterxml/jackson/dataformat/avro/AmbiguousUnionWriteTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
...est/java/com/fasterxml/jackson/dataformat/cbor/failing/ParseInvalidUTF8String236Test.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package com.fasterxml.jackson.dataformat.cbor.failing; | ||
|
||
import com.fasterxml.jackson.core.JsonToken; | ||
import com.fasterxml.jackson.dataformat.cbor.CBORParser; | ||
import com.fasterxml.jackson.dataformat.cbor.CBORTestBase; | ||
|
||
public class ParseInvalidUTF8String236Test extends CBORTestBase | ||
{ | ||
// [dataformats-binary#236]: Ends with the first byte of alleged 2-byte | ||
// UTF-8 character; parser trying to access second byte beyond end. | ||
public void testArrayIssue236() throws Exception | ||
{ | ||
final byte[] input = {0x66, (byte) 0xef, 0x7d, 0x7d, 0xa, 0x2d, (byte) 0xda}; | ||
try (CBORParser p = cborParser(input)) { | ||
assertToken(JsonToken.VALUE_STRING, p.nextToken()); | ||
assertEquals("foobar", p.getText()); | ||
assertNull(p.nextToken()); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters