diff options
author | Benjamin Larsson <banan@ludd.ltu.se> | 2009-04-25 17:46:27 +0000 |
---|---|---|
committer | Benjamin Larsson <banan@ludd.ltu.se> | 2009-04-25 17:46:27 +0000 |
commit | ec32cfd2ccb66bf3202a98098d91f3077f2a3a45 (patch) | |
tree | aedf47ecc704510df983615a882627b80385df9d /libavcodec/cook.c | |
parent | da75426b260f0612c0dbb8cce4b0f01239070044 (diff) | |
download | ffmpeg-ec32cfd2ccb66bf3202a98098d91f3077f2a3a45.tar.gz |
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
Diffstat (limited to 'libavcodec/cook.c')
-rw-r--r-- | libavcodec/cook.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/cook.c b/libavcodec/cook.c index 8a909df0a6..99d1bdb8c6 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(); |