dfa: fix out of array write in decode_wdlt()

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2012-04-13 22:52:16 +02:00
parent 367d9b2957
commit d1c95d2ce3
1 changed files with 2 additions and 0 deletions

View File

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