From 151be2dffcc15121e986e5e1a4ffd91ba237fe04 Mon Sep 17 00:00:00 2001 From: Henrik Lundin Date: Mon, 26 Feb 2018 08:16:33 +0100 Subject: [PATCH] comfort_noise_decoder_fuzzer: limit the fuzzer input size to avoid timeout The length of the fuzzer input can sometimes be really long (more than 1000000 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 200000 bytes. NOTRY=TRUE Bug: chromium:802149 Change-Id: Ia9d2f080602bba8ff70c5f0575bb9ecfa99c537c Reviewed-on: https://webrtc-review.googlesource.com/57581 Commit-Queue: Henrik Lundin Reviewed-by: Alex Loiko Cr-Commit-Position: refs/heads/master@{#22183} --- test/fuzzers/comfort_noise_decoder_fuzzer.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/fuzzers/comfort_noise_decoder_fuzzer.cc b/test/fuzzers/comfort_noise_decoder_fuzzer.cc index 3033f20842..217f5b16c0 100644 --- a/test/fuzzers/comfort_noise_decoder_fuzzer.cc +++ b/test/fuzzers/comfort_noise_decoder_fuzzer.cc @@ -47,6 +47,9 @@ void FuzzOneInputTest(rtc::ArrayView data) { } // namespace test void FuzzOneInput(const uint8_t* data, size_t size) { + // Limit the input size to 100000 bytes to avoid fuzzer timeout. + if (size > 200000) + return; test::FuzzOneInputTest(rtc::ArrayView(data, size)); }