1
Fork 0
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:
x-yl 2021-06-01 17:28:08 +04:00 committed by Ali Mohammad Pur
parent 8c6061fc4a
commit ac712b07f9
3 changed files with 20 additions and 1 deletions

View 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;
}