From 21b5184d744eb06548e36c771d34658b11f864b6 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sun, 15 Oct 2017 15:15:36 +0100 Subject: shrink dxf fuzzer Change-Id: I8bd1327d23ebc79723f4e3492067950ca2408020 --- vcl/Executable_dxffuzzer.mk | 1 - vcl/workben/dxffuzzer.cxx | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) (limited to 'vcl') diff --git a/vcl/Executable_dxffuzzer.mk b/vcl/Executable_dxffuzzer.mk index 1b78cfb4f598..2b8665466b42 100644 --- a/vcl/Executable_dxffuzzer.mk +++ b/vcl/Executable_dxffuzzer.mk @@ -33,7 +33,6 @@ $(eval $(call gb_Executable_use_libraries,dxffuzzer,\ $(eval $(call gb_Executable_use_static_libraries,dxffuzzer,\ findsofficepath \ ulingu \ - fuzzer_core \ fuzzerstubs \ )) diff --git a/vcl/workben/dxffuzzer.cxx b/vcl/workben/dxffuzzer.cxx index 7320a24fb786..2b062ebf65c6 100644 --- a/vcl/workben/dxffuzzer.cxx +++ b/vcl/workben/dxffuzzer.cxx @@ -11,6 +11,38 @@ #include #include "commonfuzzer.hxx" +#include +#include + +extern "C" { +void * com_sun_star_i18n_LocaleDataImpl_get_implementation( void *, void * ); +void * com_sun_star_i18n_BreakIterator_Unicode_get_implementation( void *, void * ); +void * com_sun_star_i18n_BreakIterator_get_implementation( void *, void * ); +} + +const lib_to_factory_mapping * +lo_get_factory_map(void) +{ + static lib_to_factory_mapping map[] = { + { 0, 0 } + }; + + return map; +} + +const lib_to_constructor_mapping * +lo_get_constructor_map(void) +{ + static lib_to_constructor_mapping map[] = { + { "com_sun_star_i18n_LocaleDataImpl_get_implementation", com_sun_star_i18n_LocaleDataImpl_get_implementation }, + { "com_sun_star_i18n_BreakIterator_Unicode_get_implementation", com_sun_star_i18n_BreakIterator_Unicode_get_implementation }, + { "com_sun_star_i18n_BreakIterator_get_implementation", com_sun_star_i18n_BreakIterator_get_implementation }, + { 0, 0 } + }; + + return map; +} + extern "C" bool idxGraphicImport(SvStream& rStream, Graphic& rGraphic, FilterConfigItem* pConfigItem); extern "C" int LLVMFuzzerInitialize(int *argc, char ***argv) -- cgit