Browse Source

dfa: Fix out of array write in decode_dds1()

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n0.11
Michael Niedermayer 13 years ago
parent
commit
72b9537d88
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavcodec/dfa.c

+ 1
- 1
libavcodec/dfa.c View File

@@ -149,7 +149,7 @@ static int decode_dds1(GetByteContext *gb, uint8_t *frame, int width, int height
bitbuf = bytestream2_get_le16u(gb);
mask = 1;
}
if (frame_end - frame < 2)
if (frame_end - frame < width + 2)
return -1;
if (bitbuf & mask) {
v = bytestream2_get_le16(gb);


Loading…
Cancel
Save