aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/dfa.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-04-13 22:57:23 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-04-13 22:59:33 +0200
commit72b9537d8886f679494651df517dfed9b420cf1f (patch)
treed7ab30c2694b51e9dc36f02544ece21b500354a4 /libavcodec/dfa.c
parentd1c95d2ce39560e251fdb14f4af91b04fd7b845c (diff)
downloadffmpeg-72b9537d8886f679494651df517dfed9b420cf1f.tar.gz
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>
Diffstat (limited to 'libavcodec/dfa.c')
-rw-r--r--libavcodec/dfa.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/dfa.c b/libavcodec/dfa.c
index 13637d6a05..9664b47d4f 100644
--- a/libavcodec/dfa.c
+++ b/libavcodec/dfa.c
@@ -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);