1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 04:17:35 +00:00

Lagom/Fuzzers: Add SQL parser fuzzer

This commit is contained in:
Luke 2021-05-31 11:43:22 +01:00 committed by Ali Mohammad Pur
parent 6219c3ec3c
commit 3bc2527ce7
2 changed files with 17 additions and 0 deletions

View 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;
}