[Libreoffice-commits] core.git: vcl/Executable_ww2fuzzer.mk vcl/workben

Caolán McNamara caolanm at redhat.com
Thu Oct 19 14:17:37 UTC 2017


 vcl/Executable_ww2fuzzer.mk |    1 
 vcl/workben/ww2fuzzer.cxx   |   55 ++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 55 insertions(+), 1 deletion(-)

New commits:
commit bea5f123f68acec84ba12d17938e25b7e112a43b
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Oct 19 15:12:23 2017 +0100

    shrink ww2 fuzzer
    
    Change-Id: Id30693b2e0cd260bf5ee7d22e8c701b4566e54d6

diff --git a/vcl/Executable_ww2fuzzer.mk b/vcl/Executable_ww2fuzzer.mk
index 02acbdfc64ea..bd6f95fa3ecb 100644
--- a/vcl/Executable_ww2fuzzer.mk
+++ b/vcl/Executable_ww2fuzzer.mk
@@ -34,7 +34,6 @@ $(eval $(call gb_Executable_use_libraries,ww2fuzzer,\
 $(eval $(call gb_Executable_use_static_libraries,ww2fuzzer,\
     findsofficepath \
     ulingu \
-    fuzzer_writer \
     fuzzerstubs \
 ))
 
diff --git a/vcl/workben/ww2fuzzer.cxx b/vcl/workben/ww2fuzzer.cxx
index fc6f4e6d2c17..422f729911ae 100644
--- a/vcl/workben/ww2fuzzer.cxx
+++ b/vcl/workben/ww2fuzzer.cxx
@@ -11,6 +11,61 @@
 #include <vcl/FilterConfigItem.hxx>
 #include "commonfuzzer.hxx"
 
+#include <config_features.h>
+#include <osl/detail/component-mapping.h>
+
+extern "C" {
+void * unoxml_component_getFactory( const char* , void* , void* );
+void * i18npool_component_getFactory( const char* , void* , void* );
+void * emfio_component_getFactory( const char* , void* , void* );
+
+void * com_sun_star_comp_framework_Desktop_get_implementation( void *, void * );
+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 * );
+void * SfxDocumentMetaData_get_implementation( void *, void * );
+void * com_sun_star_i18n_CharacterClassification_Unicode_get_implementation( void *, void * );
+void * com_sun_star_i18n_CharacterClassification_get_implementation( void *, void * );
+void * com_sun_star_i18n_NativeNumberSupplier_get_implementation( void *, void * );
+void * com_sun_star_i18n_NumberFormatCodeMapper_get_implementation( void *, void * );
+void * com_sun_star_comp_graphic_GraphicProvider_get_implementation( void *, void * );
+void * IndexedPropertyValuesContainer_get_implementation( void *, void * );
+}
+
+const lib_to_factory_mapping *
+lo_get_factory_map(void)
+{
+    static lib_to_factory_mapping map[] = {
+        { "libunoxmllo.a", unoxml_component_getFactory },
+        { "libi18npoollo.a", i18npool_component_getFactory },
+        { "libemfiolo.a", emfio_component_getFactory },
+        { 0, 0 }
+    };
+
+    return map;
+}
+
+const lib_to_constructor_mapping *
+lo_get_constructor_map(void)
+{
+    static lib_to_constructor_mapping map[] = {
+        { "com_sun_star_comp_framework_Desktop_get_implementation", com_sun_star_comp_framework_Desktop_get_implementation },
+        { "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 },
+        { "SfxDocumentMetaData_get_implementation", SfxDocumentMetaData_get_implementation },
+        { "com_sun_star_i18n_CharacterClassification_Unicode_get_implementation", com_sun_star_i18n_CharacterClassification_Unicode_get_implementation },
+        { "com_sun_star_i18n_CharacterClassification_get_implementation", com_sun_star_i18n_CharacterClassification_get_implementation },
+        { "com_sun_star_i18n_NativeNumberSupplier_get_implementation", com_sun_star_i18n_NativeNumberSupplier_get_implementation },
+        { "com_sun_star_i18n_NumberFormatCodeMapper_get_implementation", com_sun_star_i18n_NumberFormatCodeMapper_get_implementation },
+        { "com_sun_star_comp_graphic_GraphicProvider_get_implementation", com_sun_star_comp_graphic_GraphicProvider_get_implementation },
+        { "IndexedPropertyValuesContainer_get_implementation", IndexedPropertyValuesContainer_get_implementation },
+        { 0, 0 }
+    };
+
+    return map;
+}
+
 extern "C" bool TestImportWW2(SvStream &rStream);
 
 extern "C" int LLVMFuzzerInitialize(int *argc, char ***argv)


More information about the Libreoffice-commits mailing list