possible endless loop above 24 bits

This commit is contained in:
Arndt Brenschede 2017-10-07 11:47:39 +02:00
parent c517ccc2df
commit 638ce5bbd7

View file

@ -72,6 +72,10 @@ public class BitCoderContext
int range = 1;
int cnt = 1;
fillBuffer();
if ( (b & 0xffffff ) == 0 )
{
return decodeVarBits2(); // fast version limited to 24 bit
}
while ((b & range) == 0)
{
range = (range << 1) | 1;