diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-03-12 00:28:08 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-03-12 02:42:50 +0100 |
commit | 2e7bc9c2a1f138d305f111bb07d8b70e494584a8 (patch) | |
tree | 68950c6ccd7424f5f61025b3a7d62d5ae00fe2cb /libavcodec/snowdec.c | |
parent | 73b40e2eb6826c5bd08a233e6d2e25b55f9113da (diff) | |
download | ffmpeg-2e7bc9c2a1f138d305f111bb07d8b70e494584a8.tar.gz |
snowdec: fix off by 1 error in dimensions check
fixes infinite loop
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/snowdec.c')
-rw-r--r-- | libavcodec/snowdec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/snowdec.c b/libavcodec/snowdec.c index e2115068c8..1bfd0969c8 100644 --- a/libavcodec/snowdec.c +++ b/libavcodec/snowdec.c @@ -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; } |