Commit 742d8601 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/vorbis: fix decoding of single element huffman trees

Fixes Ticket2893
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent b918d6e2
......@@ -85,6 +85,11 @@ int ff_vorbis_len2vlc(uint8_t *bits, uint32_t *codes, unsigned num)
++p;
for (i = p; (bits[i] == 0) && (i < num); ++i)
;
if (i == num)
return 0;
for (; p < num; ++p) {
if (bits[p] > 32)
return AVERROR_INVALIDDATA;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment