Skip to content

Commit 7ca30ec

Browse files
emilyselwoodcowtowncoder
authored andcommitted
array index out of bounds in hex lookup (#578)
1 parent da5365e commit 7ca30ec

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/test/java/com/fasterxml/jackson/core/io/TestCharTypes.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,12 @@ public void testAppendQuoted0_31 ()
2020
assertEquals(expected, actual);
2121
}
2222
}
23+
24+
public void testHexOutOfRange()
25+
{
26+
final int[] inputs = {0, -1, 1, 129, -129};
27+
for (int input : inputs) {
28+
assertEquals(-1, CharTypes.charToHex(input));
29+
}
30+
}
2331
}

0 commit comments

Comments
 (0)