Lagom/Fuzzers: Add SQL parser fuzzer
This commit is contained in:
parent
6219c3ec3c
commit
3bc2527ce7
Notes:
sideshowbarker
2024-07-18 17:07:43 +09:00
Author: https://github.com/Lubrsi Commit: https://github.com/SerenityOS/serenity/commit/3bc2527ce77 Pull-request: https://github.com/SerenityOS/serenity/pull/7625
2 changed files with 17 additions and 0 deletions
|
@ -39,6 +39,7 @@ add_simple_fuzzer(FuzzMarkdown)
|
|||
add_simple_fuzzer(FuzzRegexECMA262)
|
||||
add_simple_fuzzer(FuzzRegexPosixExtended)
|
||||
add_simple_fuzzer(FuzzShell)
|
||||
add_simple_fuzzer(FuzzSQLParser)
|
||||
add_simple_fuzzer(FuzzTTF)
|
||||
add_simple_fuzzer(FuzzURL)
|
||||
add_simple_fuzzer(FuzzUTF16BEDecoder)
|
||||
|
|
16
Meta/Lagom/Fuzzers/FuzzSQLParser.cpp
Normal file
16
Meta/Lagom/Fuzzers/FuzzSQLParser.cpp
Normal file
|
@ -0,0 +1,16 @@
|
|||
/*
|
||||
* Copyright (c) 2021, Luke Wilde <lukew@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibSQL/Lexer.h>
|
||||
#include <LibSQL/Parser.h>
|
||||
#include <stdio.h>
|
||||
|
||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
|
||||
{
|
||||
auto parser = SQL::Parser(SQL::Lexer({ data, size }));
|
||||
[[maybe_unused]] auto statement = parser.next_statement();
|
||||
return 0;
|
||||
}
|
Loading…
Add table
Reference in a new issue