| 1 | /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
| 2 | /* |
| 3 | * This file is part of the libzmf 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/librevenge-generators.h> |
| 14 | |
| 15 | #include <librevenge-stream/librevenge-stream.h> |
| 16 | |
| 17 | #include <libzmf/libzmf.h> |
| 18 | |
| 19 | extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) |
| 20 | { |
| 21 | librevenge::RVNGStringStream input(data, size); |
| 22 | librevenge::RVNGRawDrawingGenerator generator(true); |
| 23 | libzmf::ZMFDocument::parse(&input, &generator); |
| 24 | return 0; |
| 25 | } |
| 26 | |
| 27 | /* vim:set shiftwidth=2 softtabstop=2 expandtab: */ |