Blame src/fuzz/pubfuzzer.cpp
|
rpm-build |
9243a4 |
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
rpm-build |
9243a4 |
/*
|
|
rpm-build |
9243a4 |
* This file is part of the libmspub project.
|
|
rpm-build |
9243a4 |
*
|
|
rpm-build |
9243a4 |
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
rpm-build |
9243a4 |
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
rpm-build |
9243a4 |
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
rpm-build |
9243a4 |
*/
|
|
rpm-build |
9243a4 |
|
|
rpm-build |
9243a4 |
#include <algorithm>
|
|
rpm-build |
9243a4 |
#include <cstdint>
|
|
rpm-build |
9243a4 |
|
|
rpm-build |
9243a4 |
#include <libmspub/libmspub.h>
|
|
rpm-build |
9243a4 |
|
|
rpm-build |
9243a4 |
#include <librevenge-generators/RVNGDummyDrawingGenerator.h>
|
|
rpm-build |
9243a4 |
|
|
rpm-build |
9243a4 |
#include <librevenge-stream/librevenge-stream.h>
|
|
rpm-build |
9243a4 |
|
|
rpm-build |
9243a4 |
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
|
|
rpm-build |
9243a4 |
{
|
|
rpm-build |
9243a4 |
librevenge::RVNGStringStream input(data, size);
|
|
rpm-build |
9243a4 |
librevenge::RVNGDummyDrawingGenerator generator;
|
|
rpm-build |
9243a4 |
libmspub::MSPUBDocument::parse(&input, &generator);
|
|
rpm-build |
9243a4 |
return 0;
|
|
rpm-build |
9243a4 |
}
|
|
rpm-build |
9243a4 |
|
|
rpm-build |
9243a4 |
/* vim:set shiftwidth=2 softtabstop=2 expandtab: */
|