From d8c5cc7c4bc34436dd95f923dca852b335a5f1e3 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 24 Mar 2017 11:57:44 +0000 Subject: add rtf fuzzer Change-Id: I36a6294c158232bef8fceeaf5159527f467f5786 --- vcl/workben/fftester.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'vcl/workben/fftester.cxx') diff --git a/vcl/workben/fftester.cxx b/vcl/workben/fftester.cxx index 1dc51e2bdafd..3b7a1619d45e 100644 --- a/vcl/workben/fftester.cxx +++ b/vcl/workben/fftester.cxx @@ -67,7 +67,6 @@ extern "C" { static void SAL_CALL thisModule() {} } #endif typedef bool (*WFilterCall)(const OUString &rUrl, const OUString &rFlt); -typedef bool (*HFilterCall)(const OUString &rUrl); typedef bool (*FFilterCall)(SvStream &rStream); /* This constant specifies the number of inputs to process before restarting. @@ -349,16 +348,17 @@ try_again: } else if (strcmp(argv[2], "rtf") == 0) { - static HFilterCall pfnImport(nullptr); + static FFilterCall pfnImport(nullptr); if (!pfnImport) { osl::Module aLibrary; aLibrary.loadRelative(&thisModule, "libmswordlo.so", SAL_LOADMODULE_LAZY); - pfnImport = reinterpret_cast( + pfnImport = reinterpret_cast( aLibrary.getFunctionSymbol("TestImportRTF")); aLibrary.release(); } - ret = (int) (*pfnImport)(out); + SvFileStream aFileStream(out, StreamMode::READ); + ret = (int) (*pfnImport)(aFileStream); } else if ( (strcmp(argv[2], "xls") == 0) || (strcmp(argv[2], "wb2") == 0) ) -- cgit