mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 22:38:13 +00:00
Meta: Fuzz the LibIMAP Parser
This commit is contained in:
parent
8c6061fc4a
commit
ac712b07f9
3 changed files with 20 additions and 1 deletions
17
Meta/Lagom/Fuzzers/FuzzIMAPParser.cpp
Normal file
17
Meta/Lagom/Fuzzers/FuzzIMAPParser.cpp
Normal file
|
@ -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;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue