ladybird/Meta/Lagom/Fuzzers/FuzzMarkdown.cpp

19 lines
437 B
C++
Raw Normal View History

2020-07-13 15:58:55 -03:00
/*
* Copyright (c) 2020, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
2020-07-13 15:58:55 -03:00
*/
#include <AK/OwnPtr.h>
#include <AK/StringView.h>
#include <LibMarkdown/Document.h>
#include <stddef.h>
#include <stdint.h>
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
{
auto markdown = StringView(static_cast<const unsigned char*>(data), size);
2020-07-13 15:58:55 -03:00
Markdown::Document::parse(markdown);
return 0;
}