[SCM] libav/experimental: fix segfault with darkkben.free.fr/corrupted_h264.mp4

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 15:55:27 UTC 2013


The following commit has been merged in the experimental branch:
commit 08eb8fcdbfdd4d32e0177c9aff580022ca102fc8
Author: Michael Niedermayer <michaelni at gmx.at>
Date:   Tue Jan 23 19:32:26 2007 +0000

    fix segfault with darkkben.free.fr/corrupted_h264.mp4
    
    Originally committed as revision 7671 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 2d75aaa..d696676 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -4889,8 +4889,8 @@ static int decode_residual(H264Context *h, GetBitContext *gb, DCTELEM *block, in
 
     if(total_coeff==0)
         return 0;
-    if(total_coeff<0) {
-        av_log(h->s.avctx, AV_LOG_ERROR, "corrupted macroblock %d %d (total_coeff<0)\n", s->mb_x, s->mb_y);
+    if(total_coeff > (unsigned)max_coeff) {
+        av_log(h->s.avctx, AV_LOG_ERROR, "corrupted macroblock %d %d (total_coeff=%d)\n", s->mb_x, s->mb_y, total_coeff);
         return -1;
     }
 

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list