Skip to content

Commit

Permalink
Fixing the fix to #259 (was incorrectly now by-passing all quick-path…
Browse files Browse the repository at this point in the history
… decoding)
  • Loading branch information
cowtowncoder committed Mar 19, 2021
1 parent f20cf23 commit e35d4a0
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2162,9 +2162,9 @@ protected String _finishTextToken(int ch) throws IOException
// 19-Mar-2021, tatu: [dataformats-binary#259] shows the case where length
// we get is Integer.MAX_VALUE, leading to overflow. Could change values
// to longs but simpler to truncate "needed" (will never pass following test
// due to inputBuffer never being even close to that big)
// due to inputBuffer never being even close to that big).

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

if ((available >= needed)
Expand Down

0 comments on commit e35d4a0

Please sign in to comment.