mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-17 07:37:51 +01:00

The docs have been updated. max_len is libfuzzer specific, new way is fuzzer agnostic. Docs: https://chromium.googlesource.com/chromium/src/+/master/testing/libfuzzer/getting_started.md#improving-your-fuzz-target Bug: chromium:895082 Test: flexfec_sender_fuzzer input size still converges at <=200 after running locally for 5-10 minutes. Change-Id: I7a5ce95cb4d8b8ca461f6e502b81b599daa855f9 Reviewed-on: https://webrtc-review.googlesource.com/c/107883 Commit-Queue: Sam Zackrisson <saza@webrtc.org> Reviewed-by: Alex Loiko <aleloi@webrtc.org> Cr-Commit-Position: refs/heads/master@{#25361}
26 lines
981 B
C++
26 lines
981 B
C++
/*
|
|
* Copyright (c) 2015 The WebRTC project authors. All Rights Reserved.
|
|
*
|
|
* Use of this source code is governed by a BSD-style license
|
|
* that can be found in the LICENSE file in the root of the source
|
|
* tree. An additional intellectual property rights grant can be found
|
|
* in the file PATENTS. All contributing project authors may
|
|
* be found in the AUTHORS file in the root of the source tree.
|
|
*/
|
|
|
|
#include "modules/audio_coding/codecs/ilbc/audio_decoder_ilbc.h"
|
|
#include "test/fuzzers/audio_decoder_fuzzer.h"
|
|
|
|
namespace webrtc {
|
|
void FuzzOneInput(const uint8_t* data, size_t size) {
|
|
if (size > 10000) {
|
|
return;
|
|
}
|
|
AudioDecoderIlbcImpl dec;
|
|
static const int kSampleRateHz = 8000;
|
|
static const size_t kAllocatedOuputSizeSamples = kSampleRateHz / 10;
|
|
int16_t output[kAllocatedOuputSizeSamples];
|
|
FuzzAudioDecoder(DecoderFunctionType::kNormalDecode, data, size, &dec,
|
|
kSampleRateHz, sizeof(output), output);
|
|
}
|
|
} // namespace webrtc
|