# HG changeset patch # User michael # Date 1239302246 0 # Node ID 539e18dfc86a20489f159a2e2279d9cd5d0b673b # Parent 86decbea7c1c32553ad731cfaf1acf53780d958f Check spatial_decomposition_count too, fixes another crash. diff -r 86decbea7c1c -r 539e18dfc86a snow.c --- a/snow.c Thu Apr 09 18:29:54 2009 +0000 +++ b/snow.c Thu Apr 09 18:37:26 2009 +0000 @@ -3581,7 +3581,7 @@ 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 @@ 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); } }