diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-02-25 12:51:59 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-02-25 12:52:45 +0100 |
commit | f7dc6aa5fecf26618d54f5a15b06e91d7d7db39c (patch) | |
tree | 947f1d866370c8a267553135af3bfb5ed9047f14 /libavcodec | |
parent | a0312a2e853148656704914b7ff56f0d8034f6ac (diff) | |
parent | 5b47c19bfda92273ae49e83db26a565afcaed80a (diff) | |
download | ffmpeg-f7dc6aa5fecf26618d54f5a15b06e91d7d7db39c.tar.gz |
Merge commit '5b47c19bfda92273ae49e83db26a565afcaed80a'
* commit '5b47c19bfda92273ae49e83db26a565afcaed80a':
vorbisdec: Add missing checks
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/vorbisdec.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libavcodec/vorbisdec.c b/libavcodec/vorbisdec.c index 874bd31f74..0e6aae1d7f 100644 --- a/libavcodec/vorbisdec.c +++ b/libavcodec/vorbisdec.c @@ -590,7 +590,17 @@ static int vorbis_parse_setup_hdr_floors(vorbis_context *vc) floor_setup->decode = vorbis_floor0_decode; floor_setup->data.t0.order = get_bits(gb, 8); + if (!floor_setup->data.t0.order) { + av_log(vc->avccontext, AV_LOG_ERROR, + "Floor 0 order is 0.\n"); + return AVERROR_INVALIDDATA; + } floor_setup->data.t0.rate = get_bits(gb, 16); + if (!floor_setup->data.t0.rate) { + av_log(vc->avccontext, AV_LOG_ERROR, + "Floor 0 rate is 0.\n"); + return AVERROR_INVALIDDATA; + } floor_setup->data.t0.bark_map_size = get_bits(gb, 16); if (!floor_setup->data.t0.bark_map_size) { av_log(vc->avccontext, AV_LOG_ERROR, |