changeset 9369:539e18dfc86a libavcodec

Check spatial_decomposition_count too, fixes another crash.
author michael
date Thu, 09 Apr 2009 18:37:26 +0000
parents 86decbea7c1c
children 25fa07ef8e2b
files snow.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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);
         }
     }