# HG changeset patch # User banan # Date 1240681587 0 # Node ID 20c79ce2cd5ec4498fa7e6216487e96591480d40 # Parent 030eefed0f5cebcea5e8f811ba9f487140a1f53f Make sure we only parse max amount of subpackets (5) in the cook decoder. diff -r 030eefed0f5c -r 20c79ce2cd5e cook.c --- a/cook.c Sat Apr 25 17:35:21 2009 +0000 +++ b/cook.c Sat Apr 25 17:46:27 2009 +0000 @@ -1219,6 +1219,10 @@ 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();