neteq_signal_fuzzer: limit the fuzzer input size to avoid timeout

The length of the fuzzer input can sometimes be really long (more than
600000 bytes), and this take a very long time to execute. Typically,
the fuzzer times out instead. This change limits the used length of
the fuzzer to 100000 bytes.

NOTRY=TRUE

Bug: chromium:802245
Change-Id: Ibe02b6de932d900408f870d9ba440b7b8e08dc0e
Reviewed-on: https://webrtc-review.googlesource.com/57180
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22181}
This commit is contained in:
Henrik Lundin 2018-02-23 17:18:38 +01:00 committed by Commit Bot
parent 8b84365c81
commit 2a6d864264

View File

@ -142,6 +142,10 @@ class FuzzSignalInput : public NetEqInput {
void FuzzOneInputTest(const uint8_t* data, size_t size) {
if (size < 1)
return;
// Limit the input size to 100000 bytes to avoid fuzzer timeout.
if (size > 100000)
return;
FuzzDataHelper fuzz_data(rtc::ArrayView<const uint8_t>(data, size));
// Allowed sample rates and payload types used in the test.