summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2020-03-15 17:59:49 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2020-05-27 23:52:46 +0200
commit05d364dcccb3703de3f299b6ebaa13021b12c061 (patch)
tree7d0030ed01d4dfbca8a7de59a2d55f8171d35742 /tools
parent6ec009f7e22d69502db83df49383b4a7c814ed7d (diff)
tools/target_dec_fuzzer: Do not test AV_CODEC_FLAG2_FAST with AV_CODEC_ID_H264
This combination skips allocating large padding which can read out of array Fixes: 20978/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_H264_fuzzer-5746381832847360 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'tools')
-rw-r--r--tools/target_dec_fuzzer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/target_dec_fuzzer.c b/tools/target_dec_fuzzer.c
index dc7efe914d..f43f417088 100644
--- a/tools/target_dec_fuzzer.c
+++ b/tools/target_dec_fuzzer.c
@@ -206,7 +206,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
if (flags & 8)
ctx->err_recognition |= AV_EF_EXPLODE;
}
- if (flags & 0x10)
+ if ((flags & 0x10) && c->id != AV_CODEC_ID_H264)
ctx->flags2 |= AV_CODEC_FLAG2_FAST;
if (flags & 0x40)