Kaydet (Commit) c1ed005e authored tarafından Caolán McNamara's avatar Caolán McNamara

fix oss-fuzz build

Change-Id: I22823323e0b4e15dbd6ea5f7efd35301995315bf
üst 69103eaa
/*
Settings for fuzzers mode
*/
#ifndef CONFIG_FUZZERS_H
#define CONFIG_FUZZERS_H
#define ENABLE_FUZZERS 0
#endif
......@@ -9245,7 +9245,7 @@ if test "$enable_fuzzers" != yes; then
else
AC_MSG_RESULT([yes])
ENABLE_FUZZERS="TRUE"
AC_DEFINE(ENABLE_FUZZERS)
AC_DEFINE([ENABLE_FUZZERS],1)
BUILD_TYPE="$BUILD_TYPE FUZZERS"
fi
AC_SUBST(ENABLE_FUZZERS)
......@@ -12863,6 +12863,7 @@ AC_CONFIG_HEADERS([config_host/config_dbus.h])
AC_CONFIG_HEADERS([config_host/config_features.h])
AC_CONFIG_HEADERS([config_host/config_firebird.h])
AC_CONFIG_HEADERS([config_host/config_folders.h])
AC_CONFIG_HEADERS([config_host/config_fuzzers.h])
AC_CONFIG_HEADERS([config_host/config_gio.h])
AC_CONFIG_HEADERS([config_host/config_global.h])
AC_CONFIG_HEADERS([config_host/config_gpgme.h])
......
......@@ -609,6 +609,7 @@ print ("""/*
*/
#include <config_features.h>
#include <config_fuzzers.h>
#include <config_gpgme.h>
#include <osl/detail/component-mapping.h>
#include <string.h>
......@@ -639,18 +640,25 @@ print ('')
for entry in sorted(custom_widgets):
print ('void make' + entry + '();')
print ('typedef void (*custom_widget_func)();')
print ('#if !defined(ENABLE_FUZZERS)')
print ('static struct { const char *name; custom_widget_func func; } custom_widgets[] = {')
for entry in sorted(custom_widgets):
print (' { "make' + entry + '", make' + entry + ' },')
print ('};')
print ('#endif')
print ('')
print ("""
custom_widget_func lo_get_custom_widget_func(const char* name)
{
#if defined(ENABLE_FUZZERS)
(void)name;
return nullptr;
#else
for (size_t i = 0; i < sizeof(custom_widgets) / sizeof(custom_widgets[0]); i++)
if (strcmp(name, custom_widgets[i].name) == 0)
return custom_widgets[i].func;
return nullptr;
#endif
}
""")
......
......@@ -34,7 +34,6 @@ $(eval $(call gb_Executable_use_libraries,mtpfuzzer,\
$(eval $(call gb_Executable_use_static_libraries,mtpfuzzer,\
findsofficepath \
ulingu \
fuzzer_math \
fuzzerstubs \
))
......
......@@ -34,6 +34,11 @@ lo_get_constructor_map(void)
return map;
}
extern "C" void* lo_get_custom_widget_func(const char*)
{
return nullptr;
}
extern "C" bool TestImport602(SvStream &rStream);
extern "C" int LLVMFuzzerInitialize(int *argc, char ***argv)
......
......@@ -40,6 +40,11 @@ extern "C" int LLVMFuzzerInitialize(int *argc, char ***argv)
return 0;
}
extern "C" void* lo_get_custom_widget_func(const char*)
{
return nullptr;
}
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
{
SvMemoryStream aStream(const_cast<uint8_t*>(data), size, StreamMode::READ);
......
......@@ -100,6 +100,11 @@ lo_get_constructor_map(void)
return map;
}
extern "C" void* lo_get_custom_widget_func(const char*)
{
return nullptr;
}
extern "C" bool TestImportCGM(SvStream &rStream);
extern "C" int LLVMFuzzerInitialize(int *argc, char ***argv)
......
......@@ -64,6 +64,10 @@ const lib_to_constructor_mapping* lo_get_constructor_map(void)
return map;
}
extern "C" void* lo_get_custom_widget_func(const char*) { return nullptr; }
extern "C" void* ScCreateDialogFactory() { return nullptr; }
extern "C" bool TestImportDIF(SvStream& rStream);
extern "C" int LLVMFuzzerInitialize(int* argc, char*** argv)
......
......@@ -11,6 +11,11 @@
#include <vcl/FilterConfigItem.hxx>
#include "commonfuzzer.hxx"
extern "C" void* SwCreateDialogFactory()
{
return nullptr;
}
extern "C" bool TestImportDOCX(SvStream &rStream);
extern "C" int LLVMFuzzerInitialize(int *argc, char ***argv)
......
......@@ -43,6 +43,11 @@ lo_get_constructor_map(void)
return map;
}
extern "C" void* lo_get_custom_widget_func(const char*)
{
return nullptr;
}
extern "C" bool idxGraphicImport(SvStream& rStream, Graphic& rGraphic, FilterConfigItem* pConfigItem);
extern "C" int LLVMFuzzerInitialize(int *argc, char ***argv)
......
......@@ -43,6 +43,11 @@ lo_get_constructor_map(void)
return map;
}
extern "C" void* lo_get_custom_widget_func(const char*)
{
return nullptr;
}
extern "C" bool ipsGraphicImport(SvStream& rStream, Graphic& rGraphic, FilterConfigItem* pConfigItem);
extern "C" int LLVMFuzzerInitialize(int *argc, char ***argv)
......
......@@ -11,6 +11,11 @@
#include <vcl/FilterConfigItem.hxx>
#include "commonfuzzer.hxx"
extern "C" void* ScCreateDialogFactory()
{
return nullptr;
}
extern "C" bool TestImportFODS(SvStream &rStream);
extern "C" int LLVMFuzzerInitialize(int *argc, char ***argv)
......
......@@ -11,6 +11,11 @@
#include <vcl/FilterConfigItem.hxx>
#include "commonfuzzer.hxx"
extern "C" void* SwCreateDialogFactory()
{
return nullptr;
}
extern "C" bool TestImportFODT(SvStream &rStream);
extern "C" int LLVMFuzzerInitialize(int *argc, char ***argv)
......
......@@ -40,6 +40,11 @@ extern "C" int LLVMFuzzerInitialize(int *argc, char ***argv)
return 0;
}
extern "C" void* lo_get_custom_widget_func(const char*)
{
return nullptr;
}
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
{
SvMemoryStream aStream(const_cast<uint8_t*>(data), size, StreamMode::READ);
......
......@@ -11,6 +11,8 @@
#include <vcl/FilterConfigItem.hxx>
#include "commonfuzzer.hxx"
extern "C" void* SwCreateDialogFactory() { return nullptr; }
extern "C" bool TestImportHTML(SvStream& rStream);
extern "C" int LLVMFuzzerInitialize(int* argc, char*** argv)
......
......@@ -34,6 +34,11 @@ lo_get_constructor_map(void)
return map;
}
extern "C" void* lo_get_custom_widget_func(const char*)
{
return nullptr;
}
extern "C" bool TestImportHWP(SvStream &rStream);
extern "C" int LLVMFuzzerInitialize(int *argc, char ***argv)
......
......@@ -34,6 +34,11 @@ lo_get_constructor_map(void)
return map;
}
extern "C" void* lo_get_custom_widget_func(const char*)
{
return nullptr;
}
extern "C" int LLVMFuzzerInitialize(int *argc, char ***argv)
{
TypicalFuzzerInitialize(argc, argv);
......
......@@ -34,6 +34,11 @@ lo_get_constructor_map(void)
return map;
}
extern "C" void* lo_get_custom_widget_func(const char*)
{
return nullptr;
}
extern "C" bool TestImportLWP(SvStream &rStream);
extern "C" int LLVMFuzzerInitialize(int *argc, char ***argv)
......
......@@ -43,6 +43,11 @@ lo_get_constructor_map(void)
return map;
}
extern "C" void* lo_get_custom_widget_func(const char*)
{
return nullptr;
}
extern "C" bool imeGraphicImport(SvStream& rStream, Graphic& rGraphic, FilterConfigItem* pConfigItem);
extern "C" int LLVMFuzzerInitialize(int *argc, char ***argv)
......
......@@ -28,6 +28,8 @@ const lib_to_constructor_mapping* lo_get_constructor_map(void)
return map;
}
extern "C" void* lo_get_custom_widget_func(const char*) { return nullptr; }
extern "C" bool TestImportMathType(SvStream& rStream);
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
......
......@@ -42,6 +42,11 @@ lo_get_constructor_map(void)
return map;
}
extern "C" void* lo_get_custom_widget_func(const char*)
{
return nullptr;
}
extern "C" bool TestImportOLE2(SvStream &rStream);
extern "C" int LLVMFuzzerInitialize(int *argc, char ***argv)
......
......@@ -34,6 +34,11 @@ lo_get_constructor_map(void)
return map;
}
extern "C" void* lo_get_custom_widget_func(const char*)
{
return nullptr;
}
extern "C" bool icdGraphicImport(SvStream& rStream, Graphic& rGraphic, FilterConfigItem* pConfigItem);
extern "C" int LLVMFuzzerInitialize(int *argc, char ***argv)
......
......@@ -34,6 +34,11 @@ lo_get_constructor_map(void)
return map;
}
extern "C" void* lo_get_custom_widget_func(const char*)
{
return nullptr;
}
extern "C" bool iptGraphicImport(SvStream& rStream, Graphic& rGraphic, FilterConfigItem* pConfigItem);
extern "C" int LLVMFuzzerInitialize(int *argc, char ***argv)
......
......@@ -34,6 +34,11 @@ lo_get_constructor_map(void)
return map;
}
extern "C" void* lo_get_custom_widget_func(const char*)
{
return nullptr;
}
extern "C" bool ipxGraphicImport(SvStream& rStream, Graphic& rGraphic, FilterConfigItem* pConfigItem);
extern "C" int LLVMFuzzerInitialize(int *argc, char ***argv)
......
......@@ -40,6 +40,11 @@ extern "C" int LLVMFuzzerInitialize(int *argc, char ***argv)
return 0;
}
extern "C" void* lo_get_custom_widget_func(const char*)
{
return nullptr;
}
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
{
SvMemoryStream aStream(const_cast<uint8_t*>(data), size, StreamMode::READ);
......
......@@ -34,6 +34,11 @@ lo_get_constructor_map(void)
return map;
}
extern "C" void* lo_get_custom_widget_func(const char*)
{
return nullptr;
}
extern "C" bool ipbGraphicImport(SvStream& rStream, Graphic& rGraphic, FilterConfigItem* pConfigItem);
extern "C" int LLVMFuzzerInitialize(int *argc, char ***argv)
......
......@@ -98,6 +98,11 @@ lo_get_constructor_map(void)
return map;
}
extern "C" void* lo_get_custom_widget_func(const char*)
{
return nullptr;
}
extern "C" bool TestImportPPT(SvStream &rStream);
extern "C" int LLVMFuzzerInitialize(int *argc, char ***argv)
......
......@@ -34,6 +34,11 @@ lo_get_constructor_map(void)
return map;
}
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)
......
......@@ -61,6 +61,16 @@ lo_get_constructor_map(void)
return map;
}
extern "C" void* lo_get_custom_widget_func(const char*)
{
return nullptr;
}
extern "C" void* ScCreateDialogFactory()
{
return nullptr;
}
extern "C" bool TestImportQPW(SvStream &rStream);
extern "C" int LLVMFuzzerInitialize(int *argc, char ***argv)
......
......@@ -34,6 +34,11 @@ lo_get_constructor_map(void)
return map;
}
extern "C" void* lo_get_custom_widget_func(const char*)
{
return nullptr;
}
extern "C" bool iraGraphicImport(SvStream& rStream, Graphic& rGraphic, FilterConfigItem* pConfigItem);
extern "C" int LLVMFuzzerInitialize(int *argc, char ***argv)
......
......@@ -62,6 +62,16 @@ lo_get_constructor_map(void)
return map;
}
extern "C" void* lo_get_custom_widget_func(const char*)
{
return nullptr;
}
extern "C" void* SwCreateDialogFactory()
{
return nullptr;
}
extern "C" bool TestImportRTF(SvStream &rStream);
extern "C" int LLVMFuzzerInitialize(int *argc, char ***argv)
......
......@@ -61,6 +61,10 @@ const lib_to_constructor_mapping* lo_get_constructor_map(void)
return map;
}
extern "C" void* lo_get_custom_widget_func(const char*) { return nullptr; }
extern "C" void* ScCreateDialogFactory() { return nullptr; }
extern "C" bool TestImportCalcRTF(SvStream& rStream);
extern "C" int LLVMFuzzerInitialize(int* argc, char*** argv)
......
......@@ -27,6 +27,8 @@ const lib_to_constructor_mapping* lo_get_constructor_map(void)
return map;
}
extern "C" void* lo_get_custom_widget_func(const char*) { return nullptr; }
extern "C" int LLVMFuzzerInitialize(int* argc, char*** argv)
{
TypicalFuzzerInitialize(argc, argv);
......
......@@ -61,6 +61,16 @@ lo_get_constructor_map(void)
return map;
}
extern "C" void* lo_get_custom_widget_func(const char*)
{
return nullptr;
}
extern "C" void* ScCreateDialogFactory()
{
return nullptr;
}
extern "C" bool TestImportSLK(SvStream &rStream);
extern "C" int LLVMFuzzerInitialize(int *argc, char ***argv)
......
......@@ -34,6 +34,11 @@ lo_get_constructor_map(void)
return map;
}
extern "C" void* lo_get_custom_widget_func(const char*)
{
return nullptr;
}
extern "C" int LLVMFuzzerInitialize(int *argc, char ***argv)
{
TypicalFuzzerInitialize(argc, argv);
......
......@@ -34,6 +34,11 @@ lo_get_constructor_map(void)
return map;
}
extern "C" void* lo_get_custom_widget_func(const char*)
{
return nullptr;
}
extern "C" bool itgGraphicImport(SvStream& rStream, Graphic& rGraphic, FilterConfigItem* pConfigItem);
extern "C" int LLVMFuzzerInitialize(int *argc, char ***argv)
......
......@@ -34,6 +34,11 @@ lo_get_constructor_map(void)
return map;
}
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)
......
......@@ -13,6 +13,8 @@
#include <com/sun/star/ucb/XUniversalContentBroker.hpp>
#include "commonfuzzer.hxx"
extern "C" void* ScCreateDialogFactory() { return nullptr; }
extern "C" bool TestImportWKS(SvStream& rStream);
extern "C" int LLVMFuzzerInitialize(int* argc, char*** argv)
......
......@@ -46,6 +46,11 @@ lo_get_constructor_map(void)
return map;
}
extern "C" void* lo_get_custom_widget_func(const char*)
{
return nullptr;
}
extern "C" int LLVMFuzzerInitialize(int *argc, char ***argv)
{
TypicalFuzzerInitialize(argc, argv);
......
......@@ -76,6 +76,16 @@ lo_get_constructor_map(void)
return map;
}
extern "C" void* lo_get_custom_widget_func(const char*)
{
return nullptr;
}
extern "C" void* SwCreateDialogFactory()
{
return nullptr;
}
extern "C" bool TestImportWW2(SvStream &rStream);
extern "C" int LLVMFuzzerInitialize(int *argc, char ***argv)
......
......@@ -78,6 +78,16 @@ lo_get_constructor_map(void)
return map;
}
extern "C" void* lo_get_custom_widget_func(const char*)
{
return nullptr;
}
extern "C" void* SwCreateDialogFactory()
{
return nullptr;
}
extern "C" bool TestImportWW6(SvStream &rStream);
extern "C" int LLVMFuzzerInitialize(int *argc, char ***argv)
......
......@@ -78,6 +78,16 @@ lo_get_constructor_map(void)
return map;
}
extern "C" void* lo_get_custom_widget_func(const char*)
{
return nullptr;
}
extern "C" void* SwCreateDialogFactory()
{
return nullptr;
}
extern "C" bool TestImportWW8(SvStream &rStream);
extern "C" int LLVMFuzzerInitialize(int *argc, char ***argv)
......
......@@ -34,6 +34,11 @@ lo_get_constructor_map(void)
return map;
}
extern "C" void* lo_get_custom_widget_func(const char*)
{
return nullptr;
}
extern "C" int LLVMFuzzerInitialize(int *argc, char ***argv)
{
TypicalFuzzerInitialize(argc, argv);
......
......@@ -13,6 +13,8 @@
#include <com/sun/star/ucb/XUniversalContentBroker.hpp>
#include "commonfuzzer.hxx"
extern "C" void* ScCreateDialogFactory() { return nullptr; }
extern "C" bool TestImportXLS(SvStream& rStream);
extern "C" int LLVMFuzzerInitialize(int* argc, char*** argv)
......
......@@ -11,6 +11,8 @@
#include <vcl/FilterConfigItem.hxx>
#include "commonfuzzer.hxx"
extern "C" void* ScCreateDialogFactory() { return nullptr; }
extern "C" bool TestImportXLSX(SvStream& rStream);
extern "C" int LLVMFuzzerInitialize(int* argc, char*** argv)
......
......@@ -34,6 +34,11 @@ lo_get_constructor_map(void)
return map;
}
extern "C" void* lo_get_custom_widget_func(const char*)
{
return nullptr;
}
extern "C" int LLVMFuzzerInitialize(int *argc, char ***argv)
{
TypicalFuzzerInitialize(argc, argv);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment