/src/serenity/Meta/Lagom/Fuzzers/FuzzSQLParser.cpp
Line | Count | Source |
1 | | /* |
2 | | * Copyright (c) 2021, Luke Wilde <lukew@serenityos.org> |
3 | | * |
4 | | * SPDX-License-Identifier: BSD-2-Clause |
5 | | */ |
6 | | |
7 | | #include <LibSQL/AST/Lexer.h> |
8 | | #include <LibSQL/AST/Parser.h> |
9 | | #include <stdio.h> |
10 | | |
11 | | extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size) |
12 | 93.2k | { |
13 | 93.2k | AK::set_debug_enabled(false); |
14 | 93.2k | auto parser = SQL::AST::Parser(SQL::AST::Lexer({ data, size })); |
15 | 93.2k | [[maybe_unused]] auto statement = parser.next_statement(); |
16 | 93.2k | return 0; |
17 | 93.2k | } |