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

View File

@ -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<FuzzRtpInput> input(
new FuzzRtpInput(rtc::ArrayView<const uint8_t>(data, size)));
std::unique_ptr<AudioChecksum> output(new AudioChecksum);