From 2a6d8642647e7794c9040f3d2e0b3d223d6825e9 Mon Sep 17 00:00:00 2001 From: Henrik Lundin Date: Fri, 23 Feb 2018 17:18:38 +0100 Subject: [PATCH] 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 Reviewed-by: Alex Loiko Cr-Commit-Position: refs/heads/master@{#22181} --- test/fuzzers/neteq_signal_fuzzer.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/fuzzers/neteq_signal_fuzzer.cc b/test/fuzzers/neteq_signal_fuzzer.cc index 28f2a1bf28..981ba282ed 100644 --- a/test/fuzzers/neteq_signal_fuzzer.cc +++ b/test/fuzzers/neteq_signal_fuzzer.cc @@ -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(data, size)); // Allowed sample rates and payload types used in the test.