Commit 06e58628 authored by michael's avatar michael

check block_max_depth (fixes crash)


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@4718 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent e1f91306
...@@ -3185,6 +3185,11 @@ static int decode_header(SnowContext *s){ ...@@ -3185,6 +3185,11 @@ static int decode_header(SnowContext *s){
s->mv_scale= get_symbol(&s->c, s->header_state, 0); s->mv_scale= get_symbol(&s->c, s->header_state, 0);
s->qbias= get_symbol(&s->c, s->header_state, 1); s->qbias= get_symbol(&s->c, s->header_state, 1);
s->block_max_depth= get_symbol(&s->c, s->header_state, 0); 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; return 0;
} }
......
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