/src/serenity/Meta/Lagom/Fuzzers/FuzzGemini.cpp
Line | Count | Source |
1 | | /* |
2 | | * Copyright (c) 2020, the SerenityOS developers. |
3 | | * |
4 | | * SPDX-License-Identifier: BSD-2-Clause |
5 | | */ |
6 | | |
7 | | #include <AK/StringView.h> |
8 | | #include <LibGemini/Document.h> |
9 | | #include <stddef.h> |
10 | | #include <stdint.h> |
11 | | |
12 | | extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size) |
13 | 93.0k | { |
14 | 93.0k | AK::set_debug_enabled(false); |
15 | 93.0k | auto gemini = StringView(static_cast<unsigned char const*>(data), size); |
16 | 93.0k | (void)Gemini::Document::parse(gemini, {}); |
17 | 93.0k | return 0; |
18 | 93.0k | } |