[FFmpeg-cvslog] vorbisdec: check codebook entry count
Michael Niedermayer
git at videolan.org
Mon May 13 14:28:14 CEST 2013
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon May 13 14:19:57 2013 +0200| [e6b6ae46951e242d7caf11acf5b1f10f109e1c96] | committer: Michael Niedermayer
vorbisdec: check codebook entry count
Fixes assertion failure
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e6b6ae46951e242d7caf11acf5b1f10f109e1c96
---
libavcodec/vorbisdec.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libavcodec/vorbisdec.c b/libavcodec/vorbisdec.c
index f30745d..ba5b1a3 100644
--- a/libavcodec/vorbisdec.c
+++ b/libavcodec/vorbisdec.c
@@ -422,6 +422,11 @@ static int vorbis_parse_setup_hdr_codebooks(vorbis_context *vc)
}
// Initialize VLC table
+ if (entries <= 0) {
+ av_log(vc->avctx, AV_LOG_ERROR, "Invalid codebook entry count\n");
+ ret = AVERROR_INVALIDDATA;
+ goto error;
+ }
if (ff_vorbis_len2vlc(tmp_vlc_bits, tmp_vlc_codes, entries)) {
av_log(vc->avctx, AV_LOG_ERROR, " Invalid code lengths while generating vlcs. \n");
ret = AVERROR_INVALIDDATA;
More information about the ffmpeg-cvslog
mailing list