# HG changeset patch # User michael # Date 1133619603 0 # Node ID d7be13d3ef00fadc760ca02fabe826ab08f4e774 # Parent 98a2bd9c86744b01600c52c40608ecb1630c2f3e check block_max_depth (fixes crash) diff -r 98a2bd9c8674 -r d7be13d3ef00 snow.c --- a/snow.c Sat Dec 03 03:07:54 2005 +0000 +++ b/snow.c Sat Dec 03 14:20:03 2005 +0000 @@ -3185,6 +3185,11 @@ s->mv_scale= get_symbol(&s->c, s->header_state, 0); s->qbias= get_symbol(&s->c, s->header_state, 1); s->block_max_depth= get_symbol(&s->c, s->header_state, 0); + if(s->block_max_depth > 1){ + av_log(s->avctx, AV_LOG_ERROR, "block_max_depth= %d is too large", s->block_max_depth); + s->block_max_depth= 0; + return -1; + } return 0; }