mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 17:47:36 +00:00
Everywhere: Run clang-format
This commit is contained in:
parent
0376c127f6
commit
086969277e
1665 changed files with 8479 additions and 8479 deletions
|
@ -12,9 +12,9 @@
|
|||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
|
||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size);
|
||||
extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size);
|
||||
|
||||
int fuzz_from_file(const char* filename)
|
||||
int fuzz_from_file(char const* filename)
|
||||
{
|
||||
struct stat file_stats;
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
|
||||
extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size)
|
||||
{
|
||||
(void)TLS::Certificate::parse_asn1({ data, size });
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include <LibGfx/BMPLoader.h>
|
||||
#include <stdio.h>
|
||||
|
||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
|
||||
extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size)
|
||||
{
|
||||
Gfx::BMPImageDecoderPlugin decoder(data, size);
|
||||
(void)decoder.frame(0);
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
|
||||
extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size)
|
||||
{
|
||||
auto* decoder = TextCodec::decoder_for("windows-1251");
|
||||
VERIFY(decoder);
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include <LibCompress/Deflate.h>
|
||||
#include <stdio.h>
|
||||
|
||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
|
||||
extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size)
|
||||
{
|
||||
auto result = Compress::DeflateCompressor::compress_all(ReadonlyBytes { data, size });
|
||||
return result.has_value();
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include <LibCompress/Deflate.h>
|
||||
#include <stdio.h>
|
||||
|
||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
|
||||
extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size)
|
||||
{
|
||||
auto result = Compress::DeflateDecompressor::decompress_all(ReadonlyBytes { data, size });
|
||||
return result.has_value();
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
|
||||
extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size)
|
||||
{
|
||||
ELF::Image elf(data, size, /*verbose_logging=*/false);
|
||||
return 0;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
|
||||
extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size)
|
||||
{
|
||||
auto flac_data = ByteBuffer::copy(data, size).release_value();
|
||||
auto flac = make<Audio::FlacLoaderPlugin>(flac_data);
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
|
||||
extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size)
|
||||
{
|
||||
Gfx::GIFImageDecoderPlugin gif_decoder(data, size);
|
||||
auto bitmap_or_error = gif_decoder.frame(0);
|
||||
|
|
|
@ -10,9 +10,9 @@
|
|||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
|
||||
extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size)
|
||||
{
|
||||
auto gemini = StringView(static_cast<const unsigned char*>(data), size);
|
||||
auto gemini = StringView(static_cast<unsigned char const*>(data), size);
|
||||
(void)Gemini::Document::parse(gemini, {});
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include <LibCompress/Gzip.h>
|
||||
#include <stdio.h>
|
||||
|
||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
|
||||
extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size)
|
||||
{
|
||||
auto result = Compress::GzipCompressor::compress_all(ReadonlyBytes { data, size });
|
||||
return result.has_value();
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include <LibCompress/Gzip.h>
|
||||
#include <stdio.h>
|
||||
|
||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
|
||||
extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size)
|
||||
{
|
||||
auto result = Compress::GzipDecompressor::decompress_all(ReadonlyBytes { data, size });
|
||||
return result.has_value();
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
|
||||
extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size)
|
||||
{
|
||||
auto* decoder = TextCodec::decoder_for("windows-1255");
|
||||
VERIFY(decoder);
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
|
||||
extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size)
|
||||
{
|
||||
auto request_wrapper = HTTP::HttpRequest::from_raw_request(ReadonlyBytes { data, size });
|
||||
if (!request_wrapper.has_value())
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
|
||||
extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size)
|
||||
{
|
||||
Gfx::ICOImageDecoderPlugin decoder(data, size);
|
||||
(void)decoder.frame(0);
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
|
||||
extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size)
|
||||
{
|
||||
auto parser = IMAP::Parser();
|
||||
parser.parse(ByteBuffer::copy(data, size).release_value(), true);
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
|
||||
extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size)
|
||||
{
|
||||
Gfx::JPGImageDecoderPlugin decoder(data, size);
|
||||
(void)decoder.frame(0);
|
||||
|
|
|
@ -12,9 +12,9 @@
|
|||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
|
||||
extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size)
|
||||
{
|
||||
auto js = StringView(static_cast<const unsigned char*>(data), size);
|
||||
auto js = StringView(static_cast<unsigned char const*>(data), size);
|
||||
auto vm = JS::VM::create();
|
||||
auto interpreter = JS::Interpreter::create<JS::GlobalObject>(*vm);
|
||||
auto parse_result = JS::Script::parse(js, interpreter->realm());
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
|
||||
extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size)
|
||||
{
|
||||
auto* decoder = TextCodec::decoder_for("windows-1252");
|
||||
VERIFY(decoder);
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
|
||||
extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size)
|
||||
{
|
||||
auto* decoder = TextCodec::decoder_for("iso-8859-2");
|
||||
VERIFY(decoder);
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
|
||||
extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size)
|
||||
{
|
||||
Crypto::Hash::MD5::hash(data, size);
|
||||
return 0;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
|
||||
extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size)
|
||||
{
|
||||
auto flac_data = ByteBuffer::copy(data, size).release_value();
|
||||
auto mp3 = make<Audio::MP3LoaderPlugin>(flac_data);
|
||||
|
|
|
@ -10,9 +10,9 @@
|
|||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
|
||||
extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size)
|
||||
{
|
||||
auto markdown = StringView(static_cast<const unsigned char*>(data), size);
|
||||
auto markdown = StringView(static_cast<unsigned char const*>(data), size);
|
||||
(void)Markdown::Document::parse(markdown);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
|
||||
extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size)
|
||||
{
|
||||
Gfx::PBMImageDecoderPlugin decoder(data, size);
|
||||
(void)decoder.frame(0);
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include <LibPDF/Document.h>
|
||||
#include <stdint.h>
|
||||
|
||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
|
||||
extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size)
|
||||
{
|
||||
ReadonlyBytes bytes { data, size };
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
|
||||
extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size)
|
||||
{
|
||||
(void)Crypto::decode_pem({ data, size });
|
||||
return 0;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
|
||||
extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size)
|
||||
{
|
||||
Gfx::PGMImageDecoderPlugin decoder(data, size);
|
||||
(void)decoder.frame(0);
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
|
||||
extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size)
|
||||
{
|
||||
Gfx::PNGImageDecoderPlugin decoder(data, size);
|
||||
(void)decoder.frame(0);
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
|
||||
extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size)
|
||||
{
|
||||
Gfx::PPMImageDecoderPlugin decoder(data, size);
|
||||
(void)decoder.frame(0);
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
|
||||
extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size)
|
||||
{
|
||||
Crypto::PK::RSA::parse_rsa_key({ data, size });
|
||||
return 0;
|
||||
|
|
|
@ -9,9 +9,9 @@
|
|||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
|
||||
extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size)
|
||||
{
|
||||
auto pattern = StringView(static_cast<const unsigned char*>(data), size);
|
||||
auto pattern = StringView(static_cast<unsigned char const*>(data), size);
|
||||
[[maybe_unused]] auto re = Regex<ECMA262>(pattern);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -9,9 +9,9 @@
|
|||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
|
||||
extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size)
|
||||
{
|
||||
auto pattern = StringView(static_cast<const unsigned char*>(data), size);
|
||||
auto pattern = StringView(static_cast<unsigned char const*>(data), size);
|
||||
[[maybe_unused]] auto re = Regex<PosixBasic>(pattern);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -9,9 +9,9 @@
|
|||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
|
||||
extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size)
|
||||
{
|
||||
auto pattern = StringView(static_cast<const unsigned char*>(data), size);
|
||||
auto pattern = StringView(static_cast<unsigned char const*>(data), size);
|
||||
[[maybe_unused]] auto re = Regex<PosixExtended>(pattern);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
|
||||
extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size)
|
||||
{
|
||||
Crypto::Hash::SHA1::hash(data, size);
|
||||
return 0;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
|
||||
extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size)
|
||||
{
|
||||
Crypto::Hash::SHA256::hash(data, size);
|
||||
return 0;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
|
||||
extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size)
|
||||
{
|
||||
Crypto::Hash::SHA384::hash(data, size);
|
||||
return 0;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
|
||||
extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size)
|
||||
{
|
||||
Crypto::Hash::SHA512::hash(data, size);
|
||||
return 0;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include <LibSQL/AST/Parser.h>
|
||||
#include <stdio.h>
|
||||
|
||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
|
||||
extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size)
|
||||
{
|
||||
auto parser = SQL::AST::Parser(SQL::AST::Lexer({ data, size }));
|
||||
[[maybe_unused]] auto statement = parser.next_statement();
|
||||
|
|
|
@ -9,9 +9,9 @@
|
|||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
|
||||
extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size)
|
||||
{
|
||||
auto source = StringView(static_cast<const unsigned char*>(data), size);
|
||||
auto source = StringView(static_cast<unsigned char const*>(data), size);
|
||||
Shell::Parser parser(source);
|
||||
(void)parser.parse();
|
||||
return 0;
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
#include <AK/URL.h>
|
||||
|
||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
|
||||
extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size)
|
||||
{
|
||||
auto string_view = StringView(data, size);
|
||||
auto url = URL(string_view);
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
|
||||
extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size)
|
||||
{
|
||||
auto* decoder = TextCodec::decoder_for("utf-16be");
|
||||
VERIFY(decoder);
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
|
||||
extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size)
|
||||
{
|
||||
if (!data)
|
||||
return 0;
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
|
||||
extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size)
|
||||
{
|
||||
ReadonlyBytes bytes { data, size };
|
||||
InputMemoryStream stream { bytes };
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
|
||||
extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size)
|
||||
{
|
||||
auto zip_file = Archive::Zip::try_create({ data, size });
|
||||
if (!zip_file.has_value())
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include <LibCompress/Zlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
|
||||
extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size)
|
||||
{
|
||||
auto result = Compress::Zlib::decompress_all(ReadonlyBytes { data, size });
|
||||
return result.has_value();
|
||||
|
|
|
@ -73,7 +73,7 @@ extern "C" void __sanitizer_cov_trace_pc_guard_init(uint32_t* start, uint32_t* s
|
|||
__edges_stop = stop;
|
||||
|
||||
// Map the shared memory region
|
||||
const char* shm_key = getenv("SHM_ID");
|
||||
char const* shm_key = getenv("SHM_ID");
|
||||
if (!shm_key) {
|
||||
puts("[COV] no shared memory bitmap available, skipping");
|
||||
__shmem = (struct shmem_data*)malloc(SHM_SIZE);
|
||||
|
@ -205,7 +205,7 @@ int main(int, char**)
|
|||
|
||||
int result = 0;
|
||||
|
||||
auto js = StringView(static_cast<const unsigned char*>(data_buffer.data()), script_size);
|
||||
auto js = StringView(static_cast<unsigned char const*>(data_buffer.data()), script_size);
|
||||
|
||||
auto parse_result = JS::Script::parse(js, interpreter->realm());
|
||||
if (parse_result.is_error()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue