mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 02:17:34 +00:00
Lagom/Fuzzers: Add SQL parser fuzzer
This commit is contained in:
parent
6219c3ec3c
commit
3bc2527ce7
2 changed files with 17 additions and 0 deletions
|
@ -39,6 +39,7 @@ add_simple_fuzzer(FuzzMarkdown)
|
||||||
add_simple_fuzzer(FuzzRegexECMA262)
|
add_simple_fuzzer(FuzzRegexECMA262)
|
||||||
add_simple_fuzzer(FuzzRegexPosixExtended)
|
add_simple_fuzzer(FuzzRegexPosixExtended)
|
||||||
add_simple_fuzzer(FuzzShell)
|
add_simple_fuzzer(FuzzShell)
|
||||||
|
add_simple_fuzzer(FuzzSQLParser)
|
||||||
add_simple_fuzzer(FuzzTTF)
|
add_simple_fuzzer(FuzzTTF)
|
||||||
add_simple_fuzzer(FuzzURL)
|
add_simple_fuzzer(FuzzURL)
|
||||||
add_simple_fuzzer(FuzzUTF16BEDecoder)
|
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
Add a link
Reference in a new issue