diff --git a/Meta/Lagom/Fuzzers/CMakeLists.txt b/Meta/Lagom/Fuzzers/CMakeLists.txt index 19e3a70d22..d84f741529 100644 --- a/Meta/Lagom/Fuzzers/CMakeLists.txt +++ b/Meta/Lagom/Fuzzers/CMakeLists.txt @@ -43,6 +43,7 @@ add_simple_fuzzer(FuzzMarkdown LagomMarkdown) add_simple_fuzzer(FuzzRegexECMA262 LagomRegex) add_simple_fuzzer(FuzzRegexPosixBasic LagomRegex) add_simple_fuzzer(FuzzRegexPosixExtended LagomRegex) +add_simple_fuzzer(FuzzASN1 LagomCrypto LagomTLS) add_simple_fuzzer(FuzzSHA1 LagomCrypto) add_simple_fuzzer(FuzzSHA256 LagomCrypto) add_simple_fuzzer(FuzzSHA384 LagomCrypto) diff --git a/Meta/Lagom/Fuzzers/FuzzASN1.cpp b/Meta/Lagom/Fuzzers/FuzzASN1.cpp new file mode 100644 index 0000000000..e1dddca082 --- /dev/null +++ b/Meta/Lagom/Fuzzers/FuzzASN1.cpp @@ -0,0 +1,16 @@ +/* + * Copyright (c) 2021, Brian Gianforcaro + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include +#include +#include + +extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) +{ + (void)TLS::Certificate::parse_asn1({ data, size }); + + return 0; +}