From c9327751acda51d4508d86f8b8590a8387b23a7a Mon Sep 17 00:00:00 2001 From: michael Date: Thu, 9 Apr 2009 18:37:26 +0000 Subject: [PATCH] Check spatial_decomposition_count too, fixes another crash. git-svn-id: file:///var/local/repositories/ffmpeg/trunk@18392 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b --- libavcodec/snow.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/snow.c b/libavcodec/snow.c index 44cfd4498..a6718f8d3 100644 --- a/libavcodec/snow.c +++ b/libavcodec/snow.c @@ -3581,7 +3581,7 @@ static int decode_header(SnowContext *s){ s->always_reset= get_rac(&s->c, s->header_state); s->temporal_decomposition_type= get_symbol(&s->c, s->header_state, 0); s->temporal_decomposition_count= get_symbol(&s->c, s->header_state, 0); - s->spatial_decomposition_count= get_symbol(&s->c, s->header_state, 0); + GET_S(s->spatial_decomposition_count, tmp <= (unsigned)MAX_DECOMPOSITIONS) s->colorspace_type= get_symbol(&s->c, s->header_state, 0); s->chroma_h_shift= get_symbol(&s->c, s->header_state, 0); s->chroma_v_shift= get_symbol(&s->c, s->header_state, 0); @@ -3614,7 +3614,7 @@ static int decode_header(SnowContext *s){ memcpy(s->plane[2].hcoeff, s->plane[1].hcoeff, sizeof(s->plane[1].hcoeff)); } if(get_rac(&s->c, s->header_state)){ - s->spatial_decomposition_count= get_symbol(&s->c, s->header_state, 0); + GET_S(s->spatial_decomposition_count, tmp <= (unsigned)MAX_DECOMPOSITIONS) decode_qlogs(s); } } -- 2.39.2