Debian Codegraph @

src/fuzz/qxpfuzzer.cpp

raw
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /*
3 * This file is part of the libqxp project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 */
9
10 #include <cstdint>
11 #include <cstdlib>
12
13 #include <librevenge-generators/RVNGDummyDrawingGenerator.h>
14
15 #include <librevenge-stream/librevenge-stream.h>
16
17 #include <libqxp/libqxp.h>
18
19 extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
20 {
21 librevenge::RVNGStringStream input(data, size);
22 librevenge::RVNGDummyDrawingGenerator generator;
23 libqxp::QXPDocument::parse(&input, &generator);
24 return 0;
25 }
26
27 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */