Debian Codegraph @

src/fuzz/wpsfuzzer.cpp

raw symbols SCIP
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
2 /* libwps
3 * Version: MPL 2.0 / LGPLv2.1+
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 * Major Contributor(s):
10 * Copyright (C) 2006, 2007 Andrew Ziem
11 * Copyright (C) 2004 Marc Maurer ([email protected])
12 * Copyright (C) 2004-2006 Fridrich Strba ([email protected])
13 *
14 * For minor contributions see the git repository.
15 *
16 * Alternatively, the contents of this file may be used under the terms
17 * of the GNU Lesser General Public License Version 2.1 or later
18 * (LGPLv2.1+), in which case the provisions of the LGPLv2.1+ are
19 * applicable instead of those above.
20 */
21
22 #include <cstdint>
23 #include <cstdlib>
24
25 #include <librevenge-generators/RVNGDummyTextGenerator.h>
26
27 #include <librevenge-stream/librevenge-stream.h>
28
29 #include <libwps/libwps.h>
30
31 extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
32 {
33 librevenge::RVNGStringStream input(data, size);
34 librevenge::RVNGDummyTextGenerator generator;
35 libwps::WPSDocument::parse(&input, &generator);
36 return 0;
37 }
38
39 /* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */