Browse Source

anm: prevent infinite loop

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
tags/n0.9
Laurent Aimar Janne Grunau 13 years ago
parent
commit
2475f1a83c
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      libavcodec/anm.c

+ 2
- 0
libavcodec/anm.c View File

@@ -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)


Loading…
Cancel
Save