mirror of
https://git.videolan.org/git/ffmpeg.git
synced 2024-09-05 07:48:07 +02:00
Prevent infinite loop in the ANM decoder.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
d39d7122e3
commit
39993860e1
@ -79,6 +79,8 @@ static inline int op(uint8_t **dst, const uint8_t *dst_end,
|
|||||||
int striplen = FFMIN(count, remaining);
|
int striplen = FFMIN(count, remaining);
|
||||||
if (buf) {
|
if (buf) {
|
||||||
striplen = FFMIN(striplen, buf_end - *buf);
|
striplen = FFMIN(striplen, buf_end - *buf);
|
||||||
|
if (*buf >= buf_end)
|
||||||
|
goto exhausted;
|
||||||
memcpy(*dst, *buf, striplen);
|
memcpy(*dst, *buf, striplen);
|
||||||
*buf += striplen;
|
*buf += striplen;
|
||||||
} else if (pixel >= 0)
|
} else if (pixel >= 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user