Makefile.in | 2 - Repository.mk | 3 ++ vcl/Executable_dxffuzzer.mk | 47 ++++++++++++++++++++++++++++++++++++++++++++ vcl/Executable_metfuzzer.mk | 47 ++++++++++++++++++++++++++++++++++++++++++++ vcl/Executable_ppmfuzzer.mk | 47 ++++++++++++++++++++++++++++++++++++++++++++ vcl/Module_vcl.mk | 3 ++ vcl/workben/dxffuzzer.cxx | 24 ++++++++++++++++++++++ vcl/workben/fftester.cxx | 44 ++++++++++++++++++++--------------------- vcl/workben/metfuzzer.cxx | 24 ++++++++++++++++++++++ vcl/workben/ppmfuzzer.cxx | 24 ++++++++++++++++++++++ 10 files changed, 242 insertions(+), 23 deletions(-)
New commits: commit ec6c0319a16f4163b123389775d9ff779fe5d9c2 Author: Caolán McNamara <caol...@redhat.com> Date: Thu Jan 12 11:43:59 2017 +0000 update symbols names to match current reality Change-Id: Iba6dbec0ec1061e8953eed06a14632305bdb3e44 diff --git a/vcl/workben/fftester.cxx b/vcl/workben/fftester.cxx index a89f014..d967541 100644 --- a/vcl/workben/fftester.cxx +++ b/vcl/workben/fftester.cxx @@ -173,9 +173,9 @@ try_again: if (!pfnImport) { osl::Module aLibrary; - aLibrary.loadRelative(&thisModule, "libicdlo.so"); + aLibrary.loadRelative(&thisModule, "libgielo.so"); pfnImport = reinterpret_cast<PFilterCall>( - aLibrary.getFunctionSymbol("GraphicImport")); + aLibrary.getFunctionSymbol("icdGraphicImport")); aLibrary.release(); } Graphic aGraphic; @@ -190,9 +190,9 @@ try_again: if (!pfnImport) { osl::Module aLibrary; - aLibrary.loadRelative(&thisModule, "libidxlo.so"); + aLibrary.loadRelative(&thisModule, "libgielo.so"); pfnImport = reinterpret_cast<PFilterCall>( - aLibrary.getFunctionSymbol("GraphicImport")); + aLibrary.getFunctionSymbol("idxGraphicImport")); aLibrary.release(); } Graphic aGraphic; @@ -207,9 +207,9 @@ try_again: if (!pfnImport) { osl::Module aLibrary; - aLibrary.loadRelative(&thisModule, "libimelo.so"); + aLibrary.loadRelative(&thisModule, "libgielo.so"); pfnImport = reinterpret_cast<PFilterCall>( - aLibrary.getFunctionSymbol("GraphicImport")); + aLibrary.getFunctionSymbol("imeGraphicImport")); aLibrary.release(); } Graphic aGraphic; @@ -224,9 +224,9 @@ try_again: if (!pfnImport) { osl::Module aLibrary; - aLibrary.loadRelative(&thisModule, "libipblo.so"); + aLibrary.loadRelative(&thisModule, "libgielo.so"); pfnImport = reinterpret_cast<PFilterCall>( - aLibrary.getFunctionSymbol("GraphicImport")); + aLibrary.getFunctionSymbol("ipbGraphicImport")); aLibrary.release(); } Graphic aGraphic; @@ -241,9 +241,9 @@ try_again: if (!pfnImport) { osl::Module aLibrary; - aLibrary.loadRelative(&thisModule, "libipdlo.so"); + aLibrary.loadRelative(&thisModule, "libgielo.so"); pfnImport = reinterpret_cast<PFilterCall>( - aLibrary.getFunctionSymbol("GraphicImport")); + aLibrary.getFunctionSymbol("ipdGraphicImport")); aLibrary.release(); } Graphic aGraphic; @@ -258,9 +258,9 @@ try_again: if (!pfnImport) { osl::Module aLibrary; - aLibrary.loadRelative(&thisModule, "libipslo.so"); + aLibrary.loadRelative(&thisModule, "libgielo.so"); pfnImport = reinterpret_cast<PFilterCall>( - aLibrary.getFunctionSymbol("GraphicImport")); + aLibrary.getFunctionSymbol("ipsGraphicImport")); aLibrary.release(); } Graphic aGraphic; @@ -275,9 +275,9 @@ try_again: if (!pfnImport) { osl::Module aLibrary; - aLibrary.loadRelative(&thisModule, "libiptlo.so"); + aLibrary.loadRelative(&thisModule, "libgielo.so"); pfnImport = reinterpret_cast<PFilterCall>( - aLibrary.getFunctionSymbol("GraphicImport")); + aLibrary.getFunctionSymbol("iptGraphicImport")); aLibrary.release(); } Graphic aGraphic; @@ -292,9 +292,9 @@ try_again: if (!pfnImport) { osl::Module aLibrary; - aLibrary.loadRelative(&thisModule, "libipxlo.so"); + aLibrary.loadRelative(&thisModule, "libgielo.so"); pfnImport = reinterpret_cast<PFilterCall>( - aLibrary.getFunctionSymbol("GraphicImport")); + aLibrary.getFunctionSymbol("ipxGraphicImport")); aLibrary.release(); } Graphic aGraphic; @@ -309,9 +309,9 @@ try_again: if (!pfnImport) { osl::Module aLibrary; - aLibrary.loadRelative(&thisModule, "libiralo.so"); + aLibrary.loadRelative(&thisModule, "libgielo.so"); pfnImport = reinterpret_cast<PFilterCall>( - aLibrary.getFunctionSymbol("GraphicImport")); + aLibrary.getFunctionSymbol("iraGraphicImport")); aLibrary.release(); } Graphic aGraphic; @@ -326,9 +326,9 @@ try_again: if (!pfnImport) { osl::Module aLibrary; - aLibrary.loadRelative(&thisModule, "libitglo.so"); + aLibrary.loadRelative(&thisModule, "libgielo.so"); pfnImport = reinterpret_cast<PFilterCall>( - aLibrary.getFunctionSymbol("GraphicImport")); + aLibrary.getFunctionSymbol("itgGraphicImport")); aLibrary.release(); } Graphic aGraphic; @@ -343,9 +343,9 @@ try_again: if (!pfnImport) { osl::Module aLibrary; - aLibrary.loadRelative(&thisModule, "libitilo.so"); + aLibrary.loadRelative(&thisModule, "libgielo.so"); pfnImport = reinterpret_cast<PFilterCall>( - aLibrary.getFunctionSymbol("GraphicImport")); + aLibrary.getFunctionSymbol("itiGraphicImport")); aLibrary.release(); } Graphic aGraphic; commit 1c364b96d3923a0b48b6494d002da45cd0a1e270 Author: Caolán McNamara <caol...@redhat.com> Date: Thu Jan 12 11:25:24 2017 +0000 add ppm/pbm fuzzer Change-Id: I6f403570abcf50be4cf11f20ea52bb2a07367b2a diff --git a/Makefile.in b/Makefile.in index dc75040..f052ced 100644 --- a/Makefile.in +++ b/Makefile.in @@ -424,7 +424,7 @@ $(foreach ide,\ eclipsecdt,\ $(eval $(call gb_Top_GbuildToIdeIntegration,$(ide)))) -fuzzers: Library_sal Library_salhelper Library_reg Library_store Library_unoidl codemaker Library_cppu Library_i18nlangtag Library_cppuhelper Library_comphelper StaticLibrary_ulingu StaticLibrary_jpeg StaticLibrary_findsofficepath Library_tl Rdb_services udkapi offapi Library_clew Library_gie Library_reflection Library_invocadapt Library_bootstrap Library_introspection Library_stocservices Library_xmlreader Library_gcc3_uno instsetoo_native more_fonts StaticLibrary_fuzzer Executable_wmffuzzer Executable_jpgfuzzer Executable_giffuzzer Executable_xbmfuzzer Executable_xpmfuzzer Executable_pngfuzzer Executable_bmpfuzzer Executable_svmfuzzer Executable_pcdfuzzer Executable_dxffuzzer Executable_metfuzzer +fuzzers: Library_sal Library_salhelper Library_reg Library_store Library_unoidl codemaker Library_cppu Library_i18nlangtag Library_cppuhelper Library_comphelper StaticLibrary_ulingu StaticLibrary_jpeg StaticLibrary_findsofficepath Library_tl Rdb_services udkapi offapi Library_clew Library_gie Library_reflection Library_invocadapt Library_bootstrap Library_introspection Library_stocservices Library_xmlreader Library_gcc3_uno instsetoo_native more_fonts StaticLibrary_fuzzer Executable_wmffuzzer Executable_jpgfuzzer Executable_giffuzzer Executable_xbmfuzzer Executable_xpmfuzzer Executable_pngfuzzer Executable_bmpfuzzer Executable_svmfuzzer Executable_pcdfuzzer Executable_dxffuzzer Executable_metfuzzer Executable_ppmfuzzer endif # MAKE_RESTARTS diff --git a/Repository.mk b/Repository.mk index 6a39035..aa8043f 100644 --- a/Repository.mk +++ b/Repository.mk @@ -104,6 +104,7 @@ $(eval $(call gb_Helper_register_executables_for_install,OOO,brand, \ $(call gb_Helper_optional,FUZZERS,pcdfuzzer) \ $(call gb_Helper_optional,FUZZERS,dxffuzzer) \ $(call gb_Helper_optional,FUZZERS,metfuzzer) \ + $(call gb_Helper_optional,FUZZERS,ppmfuzzer) \ $(if $(filter-out ANDROID IOS MACOSX WNT,$(OS)),oosplash) \ soffice_bin \ $(if $(filter DESKTOP,$(BUILD_TYPE)),unopkg_bin) \ diff --git a/vcl/Executable_ppmfuzzer.mk b/vcl/Executable_ppmfuzzer.mk new file mode 100644 index 0000000..07b87a2 --- /dev/null +++ b/vcl/Executable_ppmfuzzer.mk @@ -0,0 +1,47 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +include $(SRCDIR)/vcl/commonfuzzer.mk + +$(eval $(call gb_Executable_Executable,ppmfuzzer)) + +$(eval $(call gb_Executable_use_api,ppmfuzzer,\ + offapi \ + udkapi \ +)) + +$(eval $(call gb_Executable_use_externals,ppmfuzzer,\ + $(fuzzer_externals) \ +)) + +$(eval $(call gb_Executable_set_include,ppmfuzzer,\ + $$(INCLUDE) \ + -I$(SRCDIR)/vcl/inc \ +)) + +$(eval $(call gb_Executable_use_libraries,ppmfuzzer,\ + $(fuzzer_libraries) \ +)) + +$(eval $(call gb_Executable_use_static_libraries,ppmfuzzer,\ + findsofficepath \ + ulingu \ + fuzzer \ +)) + +$(eval $(call gb_Executable_add_exception_objects,ppmfuzzer,\ + vcl/workben/ppmfuzzer \ +)) + +$(eval $(call gb_Executable_add_libs,ppmfuzzer,\ + -lFuzzingEngine \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/vcl/Module_vcl.mk b/vcl/Module_vcl.mk index 9eaa324..2c46a97 100644 --- a/vcl/Module_vcl.mk +++ b/vcl/Module_vcl.mk @@ -117,6 +117,7 @@ $(eval $(call gb_Module_add_targets,vcl,\ Executable_pcdfuzzer \ Executable_dxffuzzer \ Executable_metfuzzer \ + Executable_ppmfuzzer \ )) endif diff --git a/vcl/workben/ppmfuzzer.cxx b/vcl/workben/ppmfuzzer.cxx new file mode 100644 index 0000000..152f08d --- /dev/null +++ b/vcl/workben/ppmfuzzer.cxx @@ -0,0 +1,24 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#include <tools/stream.hxx> +#include <vcl/FilterConfigItem.hxx> +#include "commonfuzzer.hxx" + +extern "C" bool ipbGraphicImport(SvStream& rStream, Graphic& rGraphic, FilterConfigItem* pConfigItem); + +extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) +{ + SvMemoryStream aStream(const_cast<uint8_t*>(data), size, StreamMode::READ); + Graphic aGraphic; + (void)ipbGraphicImport(aStream, aGraphic, nullptr); + return 0; +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ commit 5d98a54058322a39cd7028ddfd0b27c97c8248d5 Author: Caolán McNamara <caol...@redhat.com> Date: Thu Jan 12 11:23:07 2017 +0000 add met fuzzer Change-Id: I061739db5e7913ef13d3b862b5dee9152734d473 diff --git a/Makefile.in b/Makefile.in index f0f050a..dc75040 100644 --- a/Makefile.in +++ b/Makefile.in @@ -424,7 +424,7 @@ $(foreach ide,\ eclipsecdt,\ $(eval $(call gb_Top_GbuildToIdeIntegration,$(ide)))) -fuzzers: Library_sal Library_salhelper Library_reg Library_store Library_unoidl codemaker Library_cppu Library_i18nlangtag Library_cppuhelper Library_comphelper StaticLibrary_ulingu StaticLibrary_jpeg StaticLibrary_findsofficepath Library_tl Rdb_services udkapi offapi Library_clew Library_gie Library_reflection Library_invocadapt Library_bootstrap Library_introspection Library_stocservices Library_xmlreader Library_gcc3_uno instsetoo_native more_fonts StaticLibrary_fuzzer Executable_wmffuzzer Executable_jpgfuzzer Executable_giffuzzer Executable_xbmfuzzer Executable_xpmfuzzer Executable_pngfuzzer Executable_bmpfuzzer Executable_svmfuzzer Executable_pcdfuzzer Executable_dxffuzzer +fuzzers: Library_sal Library_salhelper Library_reg Library_store Library_unoidl codemaker Library_cppu Library_i18nlangtag Library_cppuhelper Library_comphelper StaticLibrary_ulingu StaticLibrary_jpeg StaticLibrary_findsofficepath Library_tl Rdb_services udkapi offapi Library_clew Library_gie Library_reflection Library_invocadapt Library_bootstrap Library_introspection Library_stocservices Library_xmlreader Library_gcc3_uno instsetoo_native more_fonts StaticLibrary_fuzzer Executable_wmffuzzer Executable_jpgfuzzer Executable_giffuzzer Executable_xbmfuzzer Executable_xpmfuzzer Executable_pngfuzzer Executable_bmpfuzzer Executable_svmfuzzer Executable_pcdfuzzer Executable_dxffuzzer Executable_metfuzzer endif # MAKE_RESTARTS diff --git a/Repository.mk b/Repository.mk index 3b50793..6a39035 100644 --- a/Repository.mk +++ b/Repository.mk @@ -103,6 +103,7 @@ $(eval $(call gb_Helper_register_executables_for_install,OOO,brand, \ $(call gb_Helper_optional,FUZZERS,svmfuzzer) \ $(call gb_Helper_optional,FUZZERS,pcdfuzzer) \ $(call gb_Helper_optional,FUZZERS,dxffuzzer) \ + $(call gb_Helper_optional,FUZZERS,metfuzzer) \ $(if $(filter-out ANDROID IOS MACOSX WNT,$(OS)),oosplash) \ soffice_bin \ $(if $(filter DESKTOP,$(BUILD_TYPE)),unopkg_bin) \ diff --git a/vcl/Executable_metfuzzer.mk b/vcl/Executable_metfuzzer.mk new file mode 100644 index 0000000..2377f75 --- /dev/null +++ b/vcl/Executable_metfuzzer.mk @@ -0,0 +1,47 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +include $(SRCDIR)/vcl/commonfuzzer.mk + +$(eval $(call gb_Executable_Executable,metfuzzer)) + +$(eval $(call gb_Executable_use_api,metfuzzer,\ + offapi \ + udkapi \ +)) + +$(eval $(call gb_Executable_use_externals,metfuzzer,\ + $(fuzzer_externals) \ +)) + +$(eval $(call gb_Executable_set_include,metfuzzer,\ + $$(INCLUDE) \ + -I$(SRCDIR)/vcl/inc \ +)) + +$(eval $(call gb_Executable_use_libraries,metfuzzer,\ + $(fuzzer_libraries) \ +)) + +$(eval $(call gb_Executable_use_static_libraries,metfuzzer,\ + findsofficepath \ + ulingu \ + fuzzer \ +)) + +$(eval $(call gb_Executable_add_exception_objects,metfuzzer,\ + vcl/workben/metfuzzer \ +)) + +$(eval $(call gb_Executable_add_libs,metfuzzer,\ + -lFuzzingEngine \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/vcl/Module_vcl.mk b/vcl/Module_vcl.mk index 63786dd..9eaa324 100644 --- a/vcl/Module_vcl.mk +++ b/vcl/Module_vcl.mk @@ -116,6 +116,7 @@ $(eval $(call gb_Module_add_targets,vcl,\ Executable_svmfuzzer \ Executable_pcdfuzzer \ Executable_dxffuzzer \ + Executable_metfuzzer \ )) endif diff --git a/vcl/workben/metfuzzer.cxx b/vcl/workben/metfuzzer.cxx new file mode 100644 index 0000000..3bf42e0 --- /dev/null +++ b/vcl/workben/metfuzzer.cxx @@ -0,0 +1,24 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#include <tools/stream.hxx> +#include <vcl/FilterConfigItem.hxx> +#include "commonfuzzer.hxx" + +extern "C" bool imeGraphicImport(SvStream& rStream, Graphic& rGraphic, FilterConfigItem* pConfigItem); + +extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) +{ + SvMemoryStream aStream(const_cast<uint8_t*>(data), size, StreamMode::READ); + Graphic aGraphic; + (void)imeGraphicImport(aStream, aGraphic, nullptr); + return 0; +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ commit 0f6d5638c7da8b3a682d1c9b9115290768094ddf Author: Caolán McNamara <caol...@redhat.com> Date: Thu Jan 12 10:49:50 2017 +0000 add dxf fuzzer Change-Id: Ibf3d42ef0e0b0698309e567a92d0c5c45cc2ef94 diff --git a/Makefile.in b/Makefile.in index 38c2742..f0f050a 100644 --- a/Makefile.in +++ b/Makefile.in @@ -424,7 +424,7 @@ $(foreach ide,\ eclipsecdt,\ $(eval $(call gb_Top_GbuildToIdeIntegration,$(ide)))) -fuzzers: Library_sal Library_salhelper Library_reg Library_store Library_unoidl codemaker Library_cppu Library_i18nlangtag Library_cppuhelper Library_comphelper StaticLibrary_ulingu StaticLibrary_jpeg StaticLibrary_findsofficepath Library_tl Rdb_services udkapi offapi Library_clew Library_gie Library_reflection Library_invocadapt Library_bootstrap Library_introspection Library_stocservices Library_xmlreader Library_gcc3_uno instsetoo_native more_fonts StaticLibrary_fuzzer Executable_wmffuzzer Executable_jpgfuzzer Executable_giffuzzer Executable_xbmfuzzer Executable_xpmfuzzer Executable_pngfuzzer Executable_bmpfuzzer Executable_svmfuzzer Executable_pcdfuzzer +fuzzers: Library_sal Library_salhelper Library_reg Library_store Library_unoidl codemaker Library_cppu Library_i18nlangtag Library_cppuhelper Library_comphelper StaticLibrary_ulingu StaticLibrary_jpeg StaticLibrary_findsofficepath Library_tl Rdb_services udkapi offapi Library_clew Library_gie Library_reflection Library_invocadapt Library_bootstrap Library_introspection Library_stocservices Library_xmlreader Library_gcc3_uno instsetoo_native more_fonts StaticLibrary_fuzzer Executable_wmffuzzer Executable_jpgfuzzer Executable_giffuzzer Executable_xbmfuzzer Executable_xpmfuzzer Executable_pngfuzzer Executable_bmpfuzzer Executable_svmfuzzer Executable_pcdfuzzer Executable_dxffuzzer endif # MAKE_RESTARTS diff --git a/Repository.mk b/Repository.mk index 3b3491f..3b50793 100644 --- a/Repository.mk +++ b/Repository.mk @@ -102,6 +102,7 @@ $(eval $(call gb_Helper_register_executables_for_install,OOO,brand, \ $(call gb_Helper_optional,FUZZERS,bmpfuzzer) \ $(call gb_Helper_optional,FUZZERS,svmfuzzer) \ $(call gb_Helper_optional,FUZZERS,pcdfuzzer) \ + $(call gb_Helper_optional,FUZZERS,dxffuzzer) \ $(if $(filter-out ANDROID IOS MACOSX WNT,$(OS)),oosplash) \ soffice_bin \ $(if $(filter DESKTOP,$(BUILD_TYPE)),unopkg_bin) \ diff --git a/vcl/Executable_dxffuzzer.mk b/vcl/Executable_dxffuzzer.mk new file mode 100644 index 0000000..059ebd3 --- /dev/null +++ b/vcl/Executable_dxffuzzer.mk @@ -0,0 +1,47 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +include $(SRCDIR)/vcl/commonfuzzer.mk + +$(eval $(call gb_Executable_Executable,dxffuzzer)) + +$(eval $(call gb_Executable_use_api,dxffuzzer,\ + offapi \ + udkapi \ +)) + +$(eval $(call gb_Executable_use_externals,dxffuzzer,\ + $(fuzzer_externals) \ +)) + +$(eval $(call gb_Executable_set_include,dxffuzzer,\ + $$(INCLUDE) \ + -I$(SRCDIR)/vcl/inc \ +)) + +$(eval $(call gb_Executable_use_libraries,dxffuzzer,\ + $(fuzzer_libraries) \ +)) + +$(eval $(call gb_Executable_use_static_libraries,dxffuzzer,\ + findsofficepath \ + ulingu \ + fuzzer \ +)) + +$(eval $(call gb_Executable_add_exception_objects,dxffuzzer,\ + vcl/workben/dxffuzzer \ +)) + +$(eval $(call gb_Executable_add_libs,dxffuzzer,\ + -lFuzzingEngine \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/vcl/Module_vcl.mk b/vcl/Module_vcl.mk index 4afb842..63786dd 100644 --- a/vcl/Module_vcl.mk +++ b/vcl/Module_vcl.mk @@ -115,6 +115,7 @@ $(eval $(call gb_Module_add_targets,vcl,\ Executable_bmpfuzzer \ Executable_svmfuzzer \ Executable_pcdfuzzer \ + Executable_dxffuzzer \ )) endif diff --git a/vcl/workben/dxffuzzer.cxx b/vcl/workben/dxffuzzer.cxx new file mode 100644 index 0000000..a6e9fad --- /dev/null +++ b/vcl/workben/dxffuzzer.cxx @@ -0,0 +1,24 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#include <tools/stream.hxx> +#include <vcl/FilterConfigItem.hxx> +#include "commonfuzzer.hxx" + +extern "C" bool idxGraphicImport(SvStream& rStream, Graphic& rGraphic, FilterConfigItem* pConfigItem); + +extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) +{ + SvMemoryStream aStream(const_cast<uint8_t*>(data), size, StreamMode::READ); + Graphic aGraphic; + (void)idxGraphicImport(aStream, aGraphic, nullptr); + return 0; +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits