[FFmpeg-cvslog] Prevent infinite loop in the ANM decoder.
Laurent Aimar
git at videolan.org
Sat Oct 1 02:42:32 CEST 2011
ffmpeg | branch: master | Laurent Aimar <fenrir at videolan.org> | Sat Oct 1 00:44:58 2011 +0200| [39993860e1525ca5d1b07521865b7e9e1b294ed7] | committer: Michael Niedermayer
Prevent infinite loop in the ANM decoder.
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=39993860e1525ca5d1b07521865b7e9e1b294ed7
---
libavcodec/anm.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/libavcodec/anm.c b/libavcodec/anm.c
index b84aef1..188f829 100644
--- a/libavcodec/anm.c
+++ b/libavcodec/anm.c
@@ -79,6 +79,8 @@ static inline int op(uint8_t **dst, const uint8_t *dst_end,
int striplen = FFMIN(count, remaining);
if (buf) {
striplen = FFMIN(striplen, buf_end - *buf);
+ if (*buf >= buf_end)
+ goto exhausted;
memcpy(*dst, *buf, striplen);
*buf += striplen;
} else if (pixel >= 0)
More information about the ffmpeg-cvslog
mailing list