[FFmpeg-cvslog] indeo4: Check the block size if reusing the band configuration

Luca Barbato git at videolan.org
Sun Oct 13 10:23:52 CEST 2013


ffmpeg | branch: master | Luca Barbato <lu_zero at gentoo.org> | Fri Oct 11 10:51:53 2013 +0200| [0cb83c563848bf8f8365e7bd30e7e6b57ef360f0] | committer: Luca Barbato

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 at libav.org

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0cb83c563848bf8f8365e7bd30e7e6b57ef360f0
---

 libavcodec/indeo4.c |    8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/libavcodec/indeo4.c b/libavcodec/indeo4.c
index 042529f..3c749a9 100644
--- a/libavcodec/indeo4.c
+++ b/libavcodec/indeo4.c
@@ -293,6 +293,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))
@@ -378,6 +379,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 */



More information about the ffmpeg-cvslog mailing list