Skip to content

Commit

Permalink
Add reproduction of #473 (#478)
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder authored Jan 27, 2024
1 parent fb855c0 commit 3a16fe2
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1641,6 +1641,11 @@ private final String _decodeLongUnicodeName(byte[] inBuf, int inPtr, int len) th
// note: caller ensures we have enough bytes available
int outPtr = 0;
char[] outBuf = _textBuffer.emptyAndGetCurrentSegment();
// 26-Jan-2024, tatu: Must have enough space for all-ASCII, at least:
if (outBuf.length < (len + 8)) {
outBuf = _textBuffer.expandCurrentSegment(len + 8);
}

final int[] codes = SmileConstants.sUtf8UnitLengths;
// since we only check expansion for multi-byte chars, there must be
// enough room for remaining bytes as all-ASCII
Expand Down

0 comments on commit 3a16fe2

Please sign in to comment.