snowdec: fix off by 1 error in dimensions check
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 11 Mar 2013 23:28:08 +0000 (00:28 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 12 Mar 2013 01:42:50 +0000 (02:42 +0100)
fixes infinite loop

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/snowdec.c

index e211506..1bfd096 100644 (file)
@@ -345,7 +345,7 @@ static int decode_header(SnowContext *s){
         return -1;
     }
     if(FFMIN(s->avctx-> width>>s->chroma_h_shift,
-             s->avctx->height>>s->chroma_v_shift) >> (s->spatial_decomposition_count-1) <= 0){
+             s->avctx->height>>s->chroma_v_shift) >> (s->spatial_decomposition_count-1) <= 1){
         av_log(s->avctx, AV_LOG_ERROR, "spatial_decomposition_count %d too large for size\n", s->spatial_decomposition_count);
         return -1;
     }