Skip to content

Commit e35d4a0

Browse files
committed
Fixing the fix to #259 (was incorrectly now by-passing all quick-path decoding)
1 parent f20cf23 commit e35d4a0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cbor/src/main/java/com/fasterxml/jackson/dataformat/cbor/CBORParser.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2162,9 +2162,9 @@ protected String _finishTextToken(int ch) throws IOException
21622162
// 19-Mar-2021, tatu: [dataformats-binary#259] shows the case where length
21632163
// we get is Integer.MAX_VALUE, leading to overflow. Could change values
21642164
// to longs but simpler to truncate "needed" (will never pass following test
2165-
// due to inputBuffer never being even close to that big)
2165+
// due to inputBuffer never being even close to that big).
21662166

2167-
final int needed = Math.max(len + 3, Integer.MAX_VALUE);
2167+
final int needed = Math.max(len + 3, len);
21682168
final int available = _inputEnd - _inputPtr;
21692169

21702170
if ((available >= needed)

0 commit comments

Comments
 (0)