[FFmpeg-cvslog] snowdec: fix off by 1 error in dimensions check

Michael Niedermayer git at videolan.org
Tue Mar 12 02:48:02 CET 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Mar 12 00:28:08 2013 +0100| [2e7bc9c2a1f138d305f111bb07d8b70e494584a8] | committer: Michael Niedermayer

snowdec: fix off by 1 error in dimensions check

fixes infinite loop

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2e7bc9c2a1f138d305f111bb07d8b70e494584a8
---

 libavcodec/snowdec.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/snowdec.c b/libavcodec/snowdec.c
index e211506..1bfd096 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;
     }



More information about the ffmpeg-cvslog mailing list