diff options
Diffstat (limited to 'libavcodec/dfa.c')
-rw-r--r-- | libavcodec/dfa.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/dfa.c b/libavcodec/dfa.c index d8516b2f50..13637d6a05 100644 --- a/libavcodec/dfa.c +++ b/libavcodec/dfa.c @@ -242,6 +242,8 @@ static int decode_wdlt(GetByteContext *gb, uint8_t *frame, int width, int height frame += delta; segments = bytestream2_get_le16(gb); } + if (frame_end <= frame) + return -1; if (segments & 0x8000) { frame[width - 1] = segments & 0xFF; segments = bytestream2_get_le16(gb); |