Skip to content

Commit f52fbf4

Browse files
committed
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>
1 parent 0953736 commit f52fbf4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: libavcodec/dfa.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ static int decode_dds1(GetByteContext *gb, uint8_t *frame, int width, int height
175175
return AVERROR_INVALIDDATA;
176176
frame += v;
177177
} else {
178-
if (frame_end - frame < width + 3)
178+
if (frame_end - frame < width + 4)
179179
return AVERROR_INVALIDDATA;
180180
frame[0] = frame[1] =
181181
frame[width] = frame[width + 1] = bytestream2_get_byte(gb);

0 commit comments

Comments
 (0)