# HG changeset patch # User michael # Date 1239306310 0 # Node ID 6de6fb68621c78472a4ffe25ecddd689a01839f5 # Parent 25fa07ef8e2b0800d1e0ecb7ec59a37f8fe47617 Make sure spatial_decomposition_count is >0. diff -r 25fa07ef8e2b -r 6de6fb68621c snow.c --- a/snow.c Thu Apr 09 18:47:50 2009 +0000 +++ b/snow.c Thu Apr 09 19:45:10 2009 +0000 @@ -3582,7 +3582,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); - GET_S(s->spatial_decomposition_count, tmp <= (unsigned)MAX_DECOMPOSITIONS) + GET_S(s->spatial_decomposition_count, 0 < tmp && tmp <= 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); @@ -3615,7 +3615,7 @@ memcpy(s->plane[2].hcoeff, s->plane[1].hcoeff, sizeof(s->plane[1].hcoeff)); } if(get_rac(&s->c, s->header_state)){ - GET_S(s->spatial_decomposition_count, tmp <= (unsigned)MAX_DECOMPOSITIONS) + GET_S(s->spatial_decomposition_count, 0 < tmp && tmp <= MAX_DECOMPOSITIONS) decode_qlogs(s); } }