Lagom/Fuzzers: Add fuzzer for the quoted printable decoder

This commit is contained in:
Luke 2021-07-21 02:15:01 +01:00 committed by Ali Mohammad Pur
parent a00b5fc7b7
commit 7e7c65abb6
Notes: sideshowbarker 2024-07-18 08:24:30 +09:00
2 changed files with 17 additions and 0 deletions

View file

@ -32,6 +32,7 @@ add_simple_fuzzer(FuzzPNGLoader)
add_simple_fuzzer(FuzzPBMLoader)
add_simple_fuzzer(FuzzPGMLoader)
add_simple_fuzzer(FuzzPPMLoader)
add_simple_fuzzer(FuzzQuotedPrintableParser)
add_simple_fuzzer(FuzzHebrewDecoder)
add_simple_fuzzer(FuzzHttpRequest)
add_simple_fuzzer(FuzzIMAPParser)

View file

@ -0,0 +1,16 @@
/*
* Copyright (c) 2021, Luke Wilde <lukew@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <AK/String.h>
#include <AK/StringView.h>
#include <LibIMAP/QuotedPrintable.h>
extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size)
{
auto quoted_printable_string = StringView(static_cast<unsigned char const*>(data), size);
IMAP::decode_quoted_printable(quoted_printable_string);
return 0;
}