From 06fa1539f8bd3fb1652305f2569fa6a7ab333bef Mon Sep 17 00:00:00 2001 From: Henrik Lundin Date: Mon, 26 Feb 2018 07:58:23 +0100 Subject: [PATCH] neteq_rtp_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:802193 Change-Id: Id32174611fadb480f4e2c6b4f553a2ba0fa5b493 Reviewed-on: https://webrtc-review.googlesource.com/57580 Commit-Queue: Henrik Lundin Reviewed-by: Alex Loiko Cr-Commit-Position: refs/heads/master@{#22182} --- test/fuzzers/neteq_rtp_fuzzer.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/fuzzers/neteq_rtp_fuzzer.cc b/test/fuzzers/neteq_rtp_fuzzer.cc index 0f26367b68..73cbda26eb 100644 --- a/test/fuzzers/neteq_rtp_fuzzer.cc +++ b/test/fuzzers/neteq_rtp_fuzzer.cc @@ -124,6 +124,10 @@ class FuzzRtpInput : public NetEqInput { } // namespace void FuzzOneInputTest(const uint8_t* data, size_t size) { + // Limit the input size to 100000 bytes to avoid fuzzer timeout. + if (size > 100000) + return; + std::unique_ptr input( new FuzzRtpInput(rtc::ArrayView(data, size))); std::unique_ptr output(new AudioChecksum);