diff options
Diffstat (limited to 'vcl/workben')
-rw-r--r-- | vcl/workben/fftester.cxx | 12 | ||||
-rw-r--r-- | vcl/workben/psdfuzzer.cxx | 5 |
2 files changed, 4 insertions, 13 deletions
diff --git a/vcl/workben/fftester.cxx b/vcl/workben/fftester.cxx index c6c2754d4dc6..fe030475e3f8 100644 --- a/vcl/workben/fftester.cxx +++ b/vcl/workben/fftester.cxx @@ -49,6 +49,7 @@ #include <filter/RasReader.hxx> #include <filter/PcxReader.hxx> #include <filter/EpsReader.hxx> +#include <filter/PsdReader.hxx> #include <osl/file.hxx> #include <osl/module.hxx> #include <tools/stream.hxx> @@ -216,18 +217,9 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) } else if (strcmp(argv[2], "psd") == 0) { - static PFilterCall pfnImport(nullptr); - if (!pfnImport) - { - osl::Module aLibrary; - aLibrary.loadRelative(&thisModule, "libgielo.so"); - pfnImport = reinterpret_cast<PFilterCall>( - aLibrary.getFunctionSymbol("ipdGraphicImport")); - aLibrary.release(); - } Graphic aGraphic; SvFileStream aFileStream(out, StreamMode::READ); - ret = static_cast<int>((*pfnImport)(aFileStream, aGraphic, nullptr)); + ret = static_cast<int>(ImportPsdGraphic(aFileStream, aGraphic)); } else if (strcmp(argv[2], "eps") == 0) { diff --git a/vcl/workben/psdfuzzer.cxx b/vcl/workben/psdfuzzer.cxx index a1bb1823d483..652fd1cd33fb 100644 --- a/vcl/workben/psdfuzzer.cxx +++ b/vcl/workben/psdfuzzer.cxx @@ -10,6 +10,7 @@ #include <tools/stream.hxx> #include <vcl/FilterConfigItem.hxx> #include "commonfuzzer.hxx" +#include <filter/PsdReader.hxx> #include <config_features.h> #include <osl/detail/component-mapping.h> @@ -39,8 +40,6 @@ extern "C" void* lo_get_custom_widget_func(const char*) return nullptr; } -extern "C" bool ipdGraphicImport(SvStream& rStream, Graphic& rGraphic, FilterConfigItem* pConfigItem); - extern "C" int LLVMFuzzerInitialize(int *argc, char ***argv) { TypicalFuzzerInitialize(argc, argv); @@ -51,7 +50,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { SvMemoryStream aStream(const_cast<uint8_t*>(data), size, StreamMode::READ); Graphic aGraphic; - (void)ipdGraphicImport(aStream, aGraphic, nullptr); + (void)ImportPsdGraphic(aStream, aGraphic); return 0; } |