Skip to content

Commit

Permalink
Fix de5da9c: better packet validation (again)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmvalin committed Jan 22, 2025
1 parent 584a00b commit fdcc470
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion celt/celt_decoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -1113,8 +1113,8 @@ int celt_decode_with_ec_dred(CELTDecoder * OPUS_RESTRICT st, const unsigned char
len -= tmp;
qext_bytes += tmp;
} while (p==255);
if (len <= 0) return OPUS_INVALID_PACKET;
qext_bytes--;
if (len <= 0 || qext_bytes<0) return OPUS_INVALID_PACKET;
if (data[len] != 124<<1)
qext_bytes=0;
ec_dec_init(&ext_dec, (unsigned char*)data+len+1, qext_bytes);
Expand Down

0 comments on commit fdcc470

Please sign in to comment.