snowdec: fix off by 1 error in dimensions check

fixes infinite loop

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-03-12 00:28:08 +01:00
parent 73b40e2eb6
commit 2e7bc9c2a1
1 changed files with 1 additions and 1 deletions

View File

@ -345,7 +345,7 @@ static int decode_header(SnowContext *s){
return -1; return -1;
} }
if(FFMIN(s->avctx-> width>>s->chroma_h_shift, 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); av_log(s->avctx, AV_LOG_ERROR, "spatial_decomposition_count %d too large for size\n", s->spatial_decomposition_count);
return -1; return -1;
} }