1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

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
This commit is contained in:
Benjamin Larsson 2009-04-25 17:46:27 +00:00
parent da75426b26
commit ec32cfd2cc

View File

@ -1219,6 +1219,10 @@ static av_cold int cook_decode_init(AVCodecContext *avctx)
q->num_subpackets++; q->num_subpackets++;
s++; s++;
if (s > MAX_SUBPACKETS) {
av_log(avctx,AV_LOG_ERROR,"Too many subpackets > 5, report file!\n");
return -1;
}
} }
/* Generate tables */ /* Generate tables */
init_pow2table(); init_pow2table();