mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-29 19:10:26 +00:00
49d0b9e808
All GUI applications currently load all TTF fonts on startup (to populate the Gfx::FontDatabase. This could probably be smarter.) Before this patch, everyone would open the files and read them into heap-allocated storage. Now we simply mmap() them instead. :^)
15 lines
329 B
C++
15 lines
329 B
C++
/*
|
|
* Copyright (c) 2021, the SerenityOS developers.
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#include <LibTTF/Font.h>
|
|
#include <stddef.h>
|
|
#include <stdint.h>
|
|
|
|
extern "C" int LLVMFuzzerTestOneInput(u8 const* data, size_t size)
|
|
{
|
|
(void)TTF::Font::try_load_from_externally_owned_memory({ data, size });
|
|
return 0;
|
|
}
|