[Libreoffice-commits] core.git: vcl/workben
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Thu Jan 7 09:59:26 UTC 2021
vcl/workben/fftester.cxx | 12 ++----------
vcl/workben/tiffuzzer.cxx | 5 ++---
2 files changed, 4 insertions(+), 13 deletions(-)
New commits:
commit 57a59ad02d2e5e89724c0d2e60cf6e7d99fba005
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Jan 6 19:03:03 2021 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu Jan 7 10:58:42 2021 +0100
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 at redhat.com>
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 (...)
{
More information about the Libreoffice-commits
mailing list