summaryrefslogtreecommitdiff
path: root/vcl/workben
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-06-02 11:29:09 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-06-03 16:03:23 +0100
commite9ca7bc9134075979eab37f10c64c518438f7592 (patch)
tree04f482d402af19fc77b36b9782e9b6039c530d3a /vcl/workben
parent77d1e0c49adea959dd418de9b6cf9901e01be3ae (diff)
add quattro pro fuzzer
Change-Id: Ic9ba37af508eabce528ea57ae5839b1cd603b3e1
Diffstat (limited to 'vcl/workben')
-rw-r--r--vcl/workben/qpwfuzzer.cxx28
1 files changed, 28 insertions, 0 deletions
diff --git a/vcl/workben/qpwfuzzer.cxx b/vcl/workben/qpwfuzzer.cxx
new file mode 100644
index 000000000000..8f0e4e85e162
--- /dev/null
+++ b/vcl/workben/qpwfuzzer.cxx
@@ -0,0 +1,28 @@
+/* -*- 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 "commonfuzzer.hxx"
+
+extern "C" bool TestImportQPW(SvStream &rStream);
+
+extern "C" int LLVMFuzzerInitialize(int *argc, char ***argv)
+{
+ TypicalFuzzerInitialize(argc, argv);
+ return 0;
+}
+
+extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
+{
+ SvMemoryStream aStream(const_cast<uint8_t*>(data), size, StreamMode::READ);
+ (void)TestImportQPW(aStream);
+ return 0;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */