Skip to content

Commit 3a16fe2

Browse files
authored
Add reproduction of #473 (#478)
1 parent fb855c0 commit 3a16fe2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

smile/src/main/java/com/fasterxml/jackson/dataformat/smile/async/NonBlockingByteArrayParser.java

+5
Original file line numberDiff line numberDiff line change
@@ -1641,6 +1641,11 @@ private final String _decodeLongUnicodeName(byte[] inBuf, int inPtr, int len) th
16411641
// note: caller ensures we have enough bytes available
16421642
int outPtr = 0;
16431643
char[] outBuf = _textBuffer.emptyAndGetCurrentSegment();
1644+
// 26-Jan-2024, tatu: Must have enough space for all-ASCII, at least:
1645+
if (outBuf.length < (len + 8)) {
1646+
outBuf = _textBuffer.expandCurrentSegment(len + 8);
1647+
}
1648+
16441649
final int[] codes = SmileConstants.sUtf8UnitLengths;
16451650
// since we only check expansion for multi-byte chars, there must be
16461651
// enough room for remaining bytes as all-ASCII

0 commit comments

Comments
 (0)