NetEq fuzzers: Set max length in BUILD config rather than in the code

This is the preferred way.

NOTRY=True

Bug: none
Change-Id: I305d4d9cb7b66e01427958e1416d672badd72af0
Reviewed-on: https://webrtc-review.googlesource.com/86948
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23837}
This commit is contained in:
Henrik Lundin
2018-07-04 11:23:20 +02:00
committed by Commit Bot
parent 496cedfe56
commit 36c69d5114
3 changed files with 4 additions and 7 deletions

View File

@ -365,6 +365,8 @@ webrtc_fuzzer_test("neteq_rtp_fuzzer") {
"../../rtc_base:rtc_base_approved",
"../../rtc_base:rtc_base_tests_utils",
]
libfuzzer_options = [ "max_len=100000" ]
}
webrtc_fuzzer_test("neteq_signal_fuzzer") {
@ -380,6 +382,8 @@ webrtc_fuzzer_test("neteq_signal_fuzzer") {
"../../rtc_base:rtc_base_approved",
"../../rtc_base:rtc_base_tests_utils",
]
libfuzzer_options = [ "max_len=100000" ]
}
webrtc_fuzzer_test("residual_echo_detector_fuzzer") {

View File

@ -124,10 +124,6 @@ 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);

View File

@ -142,9 +142,6 @@ 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<const uint8_t>(data, size));