[FFmpeg-cvslog] anm: prevent infinite loop
Laurent Aimar
git at videolan.org
Tue Oct 11 03:52:34 CEST 2011
ffmpeg | branch: master | Laurent Aimar <fenrir at videolan.org> | Fri Sep 30 23:42:32 2011 +0000| [2475f1a83ccf313d828b25f1769e3a37442ecf64] | committer: Janne Grunau
anm: prevent infinite loop
Signed-off-by: Janne Grunau <janne-libav at jannau.net>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2475f1a83ccf313d828b25f1769e3a37442ecf64
---
libavcodec/anm.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/libavcodec/anm.c b/libavcodec/anm.c
index 94cac5e..59de984 100644
--- a/libavcodec/anm.c
+++ b/libavcodec/anm.c
@@ -81,6 +81,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