[FFmpeg-cvslog] avcodec/pngdec: check for stream end in png_decode_idat()
Michael Niedermayer
git at videolan.org
Wed Sep 25 02:18:47 CEST 2013
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Sep 25 02:08:04 2013 +0200| [65bf9a44d7b0295e03463fd143499ab5b85d0cb7] | committer: Michael Niedermayer
avcodec/pngdec: check for stream end in png_decode_idat()
Fix infinite loop
Fix Ticket2978
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=65bf9a44d7b0295e03463fd143499ab5b85d0cb7
---
libavcodec/pngdec.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c
index cee97b3..18295c5 100644
--- a/libavcodec/pngdec.c
+++ b/libavcodec/pngdec.c
@@ -381,6 +381,8 @@ static int png_decode_idat(PNGDecContext *s, int length)
s->zstream.avail_out = s->crow_size;
s->zstream.next_out = s->crow_buf;
}
+ if (ret == Z_STREAM_END)
+ break;
}
return 0;
}
More information about the ffmpeg-cvslog
mailing list