aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/dfa.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-05-05 20:42:11 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2017-05-17 20:35:19 +0200
commitc93df94fe30fb3758070cd16cbe9660c7bf117f1 (patch)
treebc43ad6df9cd26091afccd4b4d785d3f02acf9c3 /libavcodec/dfa.c
parente488ad44aacfd06112eedd98599d106f3b3d3123 (diff)
downloadffmpeg-c93df94fe30fb3758070cd16cbe9660c7bf117f1.tar.gz
avcodec/dfa: Fix off by 1 error
Fixes out of array access Fixes: 1345/clusterfuzz-testcase-minimized-6062963045695488 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit f52fbf4f3ed02a7d872d8a102006f29b4421f360) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
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 f45d019a79..5ddb647c4c 100644
--- a/libavcodec/dfa.c
+++ b/libavcodec/dfa.c
@@ -175,7 +175,7 @@ static int decode_dds1(GetByteContext *gb, uint8_t *frame, int width, int height
return AVERROR_INVALIDDATA;
frame += v;
} else {
- if (frame_end - frame < width + 3)
+ if (frame_end - frame < width + 4)
return AVERROR_INVALIDDATA;
frame[0] = frame[1] =
frame[width] = frame[width + 1] = bytestream2_get_byte(gb);