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 <henrik.lundin@webrtc.org>
Reviewed-by: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22183}
This commit is contained in:
Henrik Lundin 2018-02-26 08:16:33 +01:00 committed by Commit Bot
parent 06fa1539f8
commit 151be2dffc

View File

@ -47,6 +47,9 @@ void FuzzOneInputTest(rtc::ArrayView<const uint8_t> 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<const uint8_t>(data, size));
}