Commit dddfcd3a authored by michael's avatar michael

Make sure spatial_decomposition_count is not too large for picture size.

this led to an infinite loop in mirror().


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@18396 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent b070bd64
......@@ -3625,6 +3625,11 @@ static int decode_header(SnowContext *s){
av_log(s->avctx, AV_LOG_ERROR, "spatial_decomposition_type %d not supported", s->spatial_decomposition_type);
return -1;
}
if(FFMIN(s->avctx-> width>>s->chroma_h_shift,
s->avctx->height>>s->chroma_v_shift) >> (s->spatial_decomposition_count-1) <= 0){
av_log(s->avctx, AV_LOG_ERROR, "spatial_decomposition_count %d too large for size", s->spatial_decomposition_count);
return -1;
}
s->qlog += get_symbol(&s->c, s->header_state, 1);
s->mv_scale += get_symbol(&s->c, s->header_state, 1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment