[SCM] libav/experimental: Make sure we only parse max amount of subpackets (5) in the cook decoder.

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 16:45:00 UTC 2013


The following commit has been merged in the experimental branch:
commit ec32cfd2ccb66bf3202a98098d91f3077f2a3a45
Author: Benjamin Larsson <banan at ludd.ltu.se>
Date:   Sat Apr 25 17:46:27 2009 +0000

    Make sure we only parse max amount of subpackets (5) in the cook decoder.
    
    Originally committed as revision 18689 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavcodec/cook.c b/libavcodec/cook.c
index 8a909df..99d1bdb 100644
--- a/libavcodec/cook.c
+++ b/libavcodec/cook.c
@@ -1219,6 +1219,10 @@ static av_cold int cook_decode_init(AVCodecContext *avctx)
 
         q->num_subpackets++;
         s++;
+        if (s > MAX_SUBPACKETS) {
+            av_log(avctx,AV_LOG_ERROR,"Too many subpackets > 5, report file!\n");
+            return -1;
+        }
     }
     /* Generate tables */
     init_pow2table();

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list