summaryrefslogtreecommitdiff
path: root/libavcodec/dfa.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/dfa.c')
-rw-r--r--libavcodec/dfa.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/dfa.c b/libavcodec/dfa.c
index bbe4ce2888..6619b98301 100644
--- a/libavcodec/dfa.c
+++ b/libavcodec/dfa.c
@@ -255,6 +255,8 @@ static int decode_wdlt(GetByteContext *gb, uint8_t *frame, int width, int height
segments = bytestream2_get_le16(gb);
}
line_ptr = frame;
+ if (frame_end - frame < width)
+ return AVERROR_INVALIDDATA;
frame += width;
y++;
while (segments--) {