diff options
author | Luca Barbato <lu_zero@gentoo.org> | 2013-10-11 10:51:53 +0200 |
---|---|---|
committer | Reinhard Tartler <siretart@tauware.de> | 2014-01-05 17:16:42 -0500 |
commit | 0358a099f8abe60230dc2e5bec59bfceb7d1be07 (patch) | |
tree | fd60ba8097dfadd861b2b123a2e00225c9aac1fd /libavcodec | |
parent | 2656036757227148a442d9c0934ee49bb97a31d1 (diff) | |
download | ffmpeg-0358a099f8abe60230dc2e5bec59bfceb7d1be07.tar.gz |
indeo4: Check the block size if reusing the band configuration
Sample-Id: 00000287-google
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry picked from commit 0cb83c563848bf8f8365e7bd30e7e6b57ef360f0)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/indeo4.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libavcodec/indeo4.c b/libavcodec/indeo4.c index 42b11305e4..73a7a6672a 100644 --- a/libavcodec/indeo4.c +++ b/libavcodec/indeo4.c @@ -294,6 +294,7 @@ static int decode_band_hdr(IVI45DecContext *ctx, IVIBandDesc *band, band->is_empty = get_bits1(&ctx->gb); if (!band->is_empty) { + int old_blk_size = band->blk_size; /* skip header size * If header size is not given, header size is 4 bytes. */ if (get_bits1(&ctx->gb)) @@ -379,6 +380,13 @@ static int decode_band_hdr(IVI45DecContext *ctx, IVIBandDesc *band, band->quant_mat); return AVERROR_INVALIDDATA; } + } else { + if (old_blk_size != band->blk_size) { + av_log(avctx, AV_LOG_ERROR, + "The band block size does not match the configuration " + "inherited\n"); + return AVERROR_INVALIDDATA; + } } /* decode block huffman codebook */ |