diff options
author | x-yl <kylepereira@mail.com> | 2021-06-01 17:28:08 +0400 |
---|---|---|
committer | Ali Mohammad Pur <Ali.mpfard@gmail.com> | 2021-06-11 23:58:28 +0430 |
commit | ac712b07f9cfc5494bd259976addebabedc091d2 (patch) | |
tree | 2dea03aef3def712b96afc17fe9a9c8509185764 /Meta/Lagom/Fuzzers/FuzzIMAPParser.cpp | |
parent | 8c6061fc4af79984e2c9fbbb2300567a9f5ebbfe (diff) | |
download | serenity-ac712b07f9cfc5494bd259976addebabedc091d2.zip |
Meta: Fuzz the LibIMAP Parser
Diffstat (limited to 'Meta/Lagom/Fuzzers/FuzzIMAPParser.cpp')
-rw-r--r-- | Meta/Lagom/Fuzzers/FuzzIMAPParser.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Meta/Lagom/Fuzzers/FuzzIMAPParser.cpp b/Meta/Lagom/Fuzzers/FuzzIMAPParser.cpp new file mode 100644 index 0000000000..045adc9270 --- /dev/null +++ b/Meta/Lagom/Fuzzers/FuzzIMAPParser.cpp @@ -0,0 +1,17 @@ +/* + * Copyright (c) 2021, Kyle Pereira <hey@xylepereira.me> + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include <LibIMAP/Parser.h> +#include <stddef.h> +#include <stdint.h> + +extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) +{ + auto parser = IMAP::Parser(); + parser.parse(ByteBuffer::copy(data, size), true); + parser.parse(ByteBuffer::copy(data, size), false); + return 0; +} |