diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2024-11-30 02:37:44 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2025-01-21 22:55:10 +0100 |
commit | 90ff3ae9769dc79fd18400eedc97c352fa73926d (patch) | |
tree | c76ded2d2fb858ce44ead99bfcef7a1c827cc5a0 /tools | |
parent | ef71552cf970876085d99834abdb8e429aea9730 (diff) | |
download | ffmpeg-90ff3ae9769dc79fd18400eedc97c352fa73926d.tar.gz |
tools/target_swr_fuzzer: do not use negative numbers of samples
Fixes: signed integer overflow: -277109688 * 8 cannot be represented in type 'int'
Fixes: 376118159/clusterfuzz-testcase-minimized-ffmpeg_SWR_fuzzer-5884436320681984
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_swr_fuzzer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/target_swr_fuzzer.c b/tools/target_swr_fuzzer.c index 9192d4bed5..f154a11632 100644 --- a/tools/target_swr_fuzzer.c +++ b/tools/target_swr_fuzzer.c @@ -98,7 +98,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { av_channel_layout_copy(& in_ch_layout, &layouts[bytestream2_get_byte(&gbc) % FF_ARRAY_ELEMS(layouts)]); av_channel_layout_copy(&out_ch_layout, &layouts[bytestream2_get_byte(&gbc) % FF_ARRAY_ELEMS(layouts)]); - out_sample_nb = bytestream2_get_le32(&gbc); + out_sample_nb = bytestream2_get_le32(&gbc) & 0x7FFFFFFF; flags64 = bytestream2_get_le64(&gbc); if (flags64 & 0x10) |