Fixes a bunch of valgrind errors when decoding random junk
This commit is contained in:
parent
ad15af8863
commit
a0653ed1e7
5 changed files with 66 additions and 29 deletions
|
@ -2411,7 +2411,9 @@ int celt_decode_with_ec_float(CELTDecoder * restrict st, const unsigned char *da
|
|||
total_bits = len*8;
|
||||
tell = ec_tell(dec);
|
||||
|
||||
if (tell==1)
|
||||
if (tell >= total_bits)
|
||||
silence = 1;
|
||||
else if (tell==1)
|
||||
silence = ec_dec_bit_logp(dec, 15);
|
||||
else
|
||||
silence = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue