diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-01-12 11:25:24 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-01-12 12:25:39 +0000 |
commit | 1c364b96d3923a0b48b6494d002da45cd0a1e270 (patch) | |
tree | 8700cd8ececf6c27f3295e6c4698c018f6219eb0 /vcl/workben | |
parent | 5d98a54058322a39cd7028ddfd0b27c97c8248d5 (diff) |
add ppm/pbm fuzzer
Change-Id: I6f403570abcf50be4cf11f20ea52bb2a07367b2a
Diffstat (limited to 'vcl/workben')
-rw-r--r-- | vcl/workben/ppmfuzzer.cxx | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/vcl/workben/ppmfuzzer.cxx b/vcl/workben/ppmfuzzer.cxx new file mode 100644 index 000000000000..152f08dd438d --- /dev/null +++ b/vcl/workben/ppmfuzzer.cxx @@ -0,0 +1,24 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#include <tools/stream.hxx> +#include <vcl/FilterConfigItem.hxx> +#include "commonfuzzer.hxx" + +extern "C" bool ipbGraphicImport(SvStream& rStream, Graphic& rGraphic, FilterConfigItem* pConfigItem); + +extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) +{ + SvMemoryStream aStream(const_cast<uint8_t*>(data), size, StreamMode::READ); + Graphic aGraphic; + (void)ipbGraphicImport(aStream, aGraphic, nullptr); + return 0; +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |