Sam Zackrisson | db8df17 | 2019-10-17 15:56:21 | [diff] [blame] | 1 | /* |
| 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 Zackrisson | 2e1f16d | 2023-10-25 13:18:25 | [diff] [blame] | 14 | #include "modules/audio_processing/test/echo_canceller3_config_json.h" |
Sam Zackrisson | db8df17 | 2019-10-17 15:56:21 | [diff] [blame] | 15 | #include "test/fuzzers/fuzz_data_helper.h" |
| 16 | |
| 17 | namespace webrtc { |
| 18 | void 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 |