blob: b2ded1b5b0b1a3c0e15465406ab1275166f26052 [file] [log] [blame]
Sam Zackrissondb8df172019-10-17 15:56:211/*
2 * Copyright (c) 2019 The WebRTC project authors. All Rights Reserved.
3 *
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
11#include <string>
12
13#include "api/audio/echo_canceller3_config.h"
Sam Zackrisson2e1f16d2023-10-25 13:18:2514#include "modules/audio_processing/test/echo_canceller3_config_json.h"
Sam Zackrissondb8df172019-10-17 15:56:2115#include "test/fuzzers/fuzz_data_helper.h"
16
17namespace webrtc {
18void FuzzOneInput(const uint8_t* data, size_t size) {
19 if (size > 10000) {
20 return;
21 }
22 std::string config_json(reinterpret_cast<const char*>(data), size);
23
24 EchoCanceller3Config config;
25 bool success;
26 Aec3ConfigFromJsonString(config_json, &config, &success);
27 EchoCanceller3Config::Validate(&config);
28}
29
30} // namespace webrtc