Lagom/Fuzzers: Add fuzzer for the LibCrypto PEM parser
This commit is contained in:
parent
4f5d71b4e8
commit
aa118642aa
Notes:
sideshowbarker
2024-07-18 03:43:23 +09:00
Author: https://github.com/bgianfo Commit: https://github.com/SerenityOS/serenity/commit/aa118642aaf Pull-request: https://github.com/SerenityOS/serenity/pull/10108 Reviewed-by: https://github.com/alimpfard
2 changed files with 16 additions and 0 deletions
|
@ -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)
|
||||
|
|
15
Meta/Lagom/Fuzzers/FuzzPEM.cpp
Normal file
15
Meta/Lagom/Fuzzers/FuzzPEM.cpp
Normal 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;
|
||||
}
|
Loading…
Add table
Reference in a new issue