aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-03-08 05:13:05 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-03-08 05:13:05 +0100
commit742d8601031fc69748f62fe7c5164a22a0751021 (patch)
tree703767c9c7a475442c22fdfae8b8206cc2e9c8da
parentb918d6e2e63782df5244104d0b34340967ebc40c (diff)
downloadffmpeg-742d8601031fc69748f62fe7c5164a22a0751021.tar.gz
avcodec/vorbis: fix decoding of single element huffman trees
Fixes Ticket2893 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/vorbis.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/vorbis.c b/libavcodec/vorbis.c
index 6d2ff4bbc0..86d10407f4 100644
--- a/libavcodec/vorbis.c
+++ b/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;