avcodec/vorbis: fix decoding of single element huffman trees

Fixes Ticket2893

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pull/293/head
Michael Niedermayer 11 years ago
parent b918d6e2e6
commit 742d860103
  1. 5
      libavcodec/vorbis.c

@ -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;

Loading…
Cancel
Save