diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-01-06 19:03:03 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-01-07 10:58:42 +0100 |
commit | 57a59ad02d2e5e89724c0d2e60cf6e7d99fba005 (patch) | |
tree | fd9c43363404bd070e6ee38584d35194686ae936 /vcl | |
parent | 7c260283b5cd64220fa0b8576df3a9f3f7d96dc0 (diff) |
fix oss-fuzz build and fftester
since...
commit 94d34e53ac9eb41cba96a56bf715d4b02794a12a
Date: Tue Dec 29 22:32:01 2020 +0900
Move TIFF reader and writer from filter module into VCL
Change-Id: I2dc5da100071f51eaceaf1f8be4a191f6827668c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108891
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/workben/fftester.cxx | 12 | ||||
-rw-r--r-- | vcl/workben/tiffuzzer.cxx | 5 |
2 files changed, 4 insertions, 13 deletions
diff --git a/vcl/workben/fftester.cxx b/vcl/workben/fftester.cxx index 66b51a5d38e1..42c2447564e7 100644 --- a/vcl/workben/fftester.cxx +++ b/vcl/workben/fftester.cxx @@ -42,6 +42,7 @@ #include <vcl/wmf.hxx> #include <vcl/wrkwin.hxx> #include <fltcall.hxx> +#include <filter/TiffReader.hxx> #include <osl/file.hxx> #include <osl/module.hxx> #include <tools/stream.hxx> @@ -308,18 +309,9 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) } else if (strcmp(argv[2], "tif") == 0) { - static PFilterCall pfnImport(nullptr); - if (!pfnImport) - { - osl::Module aLibrary; - aLibrary.loadRelative(&thisModule, "libgielo.so"); - pfnImport = reinterpret_cast<PFilterCall>( - aLibrary.getFunctionSymbol("itiGraphicImport")); - aLibrary.release(); - } Graphic aGraphic; SvFileStream aFileStream(out, StreamMode::READ); - ret = static_cast<int>((*pfnImport)(aFileStream, aGraphic, nullptr)); + ret = static_cast<int>(ImportTiffGraphicImport(aFileStream, aGraphic)); } else if ((strcmp(argv[2], "doc") == 0) || (strcmp(argv[2], "ww8") == 0)) { diff --git a/vcl/workben/tiffuzzer.cxx b/vcl/workben/tiffuzzer.cxx index 2ca83d7b05d8..14dcf42ecf89 100644 --- a/vcl/workben/tiffuzzer.cxx +++ b/vcl/workben/tiffuzzer.cxx @@ -9,6 +9,7 @@ #include <tools/stream.hxx> #include <vcl/FilterConfigItem.hxx> +#include <filter/TiffReader.hxx> #include "commonfuzzer.hxx" #include <config_features.h> @@ -39,8 +40,6 @@ extern "C" void* lo_get_custom_widget_func(const char*) return nullptr; } -extern "C" bool itiGraphicImport(SvStream& rStream, Graphic& rGraphic, FilterConfigItem* pConfigItem); - extern "C" int LLVMFuzzerInitialize(int *argc, char ***argv) { TypicalFuzzerInitialize(argc, argv); @@ -53,7 +52,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)itiGraphicImport(aStream, aGraphic, nullptr); + (void)ImportTiffGraphicImport(aStream, aGraphic); } catch (...) { |