Lagom/Fuzzers: Add fuzzer for the LibCrypto PEM parser

This commit is contained in:
Brian Gianforcaro 2021-09-18 10:02:52 -07:00 committed by Brian Gianforcaro
parent 4f5d71b4e8
commit aa118642aa
Notes: sideshowbarker 2024-07-18 03:43:23 +09:00
2 changed files with 16 additions and 0 deletions

View file

@ -28,6 +28,7 @@ add_simple_fuzzer(FuzzGzipDecompression LagomCompress)
add_simple_fuzzer(FuzzICOLoader LagomGfx)
add_simple_fuzzer(FuzzJPGLoader LagomGfx)
add_simple_fuzzer(FuzzMD5 LagomCrypto)
add_simple_fuzzer(FuzzPEM LagomCrypto)
add_simple_fuzzer(FuzzPNGLoader LagomGfx)
add_simple_fuzzer(FuzzPBMLoader LagomGfx)
add_simple_fuzzer(FuzzPGMLoader LagomGfx)

View file

@ -0,0 +1,15 @@
/*
* Copyright (c) 2021, Brian Gianforcaro <bgianf@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <LibCrypto/ASN1/PEM.h>
#include <stddef.h>
#include <stdint.h>
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
{
(void)Crypto::decode_pem({ data, size });
return 0;
}