dfa: check for invalid access in decode_wdlt().
This can happen when the number of skipped lines is not consistent with
the number of coded lines.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry picked from commit 3623589edc
)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
This commit is contained in:

committed by
Reinhard Tartler

parent
33c9e18b09
commit
96cf80609a
@@ -263,6 +263,8 @@ static int decode_wdlt(uint8_t *frame, int width, int height,
|
|||||||
segments = bytestream_get_le16(&src);
|
segments = bytestream_get_le16(&src);
|
||||||
}
|
}
|
||||||
line_ptr = frame;
|
line_ptr = frame;
|
||||||
|
if (frame_end - frame < width)
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
frame += width;
|
frame += width;
|
||||||
y++;
|
y++;
|
||||||
while (segments--) {
|
while (segments--) {
|
||||||
|
Reference in New Issue
Block a user