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

add gif fuzzer

Change-Id: I47dc449464cc7643d05b73e9612d01e50a8d4b8e
üst 1b60db95
......@@ -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
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
endif # MAKE_RESTARTS
......
......@@ -95,6 +95,7 @@ $(eval $(call gb_Helper_register_executables_for_install,OOO,brand, \
$(call gb_Helper_optional,BREAKPAD,minidump_upload) \
$(call gb_Helper_optional,FUZZERS,wmffuzzer) \
$(call gb_Helper_optional,FUZZERS,jpgfuzzer) \
$(call gb_Helper_optional,FUZZERS,giffuzzer) \
$(if $(filter-out ANDROID IOS MACOSX WNT,$(OS)),oosplash) \
soffice_bin \
$(if $(filter DESKTOP,$(BUILD_TYPE)),unopkg_bin) \
......
# -*- 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,giffuzzer))
$(eval $(call gb_Executable_use_api,giffuzzer,\
offapi \
udkapi \
))
$(eval $(call gb_Executable_use_externals,giffuzzer,\
$(fuzzer_externals) \
))
$(eval $(call gb_Executable_set_include,giffuzzer,\
$$(INCLUDE) \
-I$(SRCDIR)/vcl/inc \
))
$(eval $(call gb_Executable_use_libraries,giffuzzer,\
$(fuzzer_libraries) \
))
$(eval $(call gb_Executable_use_static_libraries,giffuzzer,\
findsofficepath \
ulingu \
fuzzer \
))
$(eval $(call gb_Executable_add_exception_objects,giffuzzer,\
vcl/workben/giffuzzer \
))
$(eval $(call gb_Executable_add_libs,giffuzzer,\
-lFuzzingEngine \
))
# vim: set noet sw=4 ts=4:
......@@ -108,6 +108,7 @@ $(eval $(call gb_Module_add_targets,vcl,\
StaticLibrary_fuzzer \
Executable_wmffuzzer \
Executable_jpgfuzzer \
Executable_giffuzzer \
))
endif
......
/* -*- 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 <../source/filter/igif/gifread.hxx>
#include "commonfuzzer.hxx"
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
{
SvMemoryStream aStream(const_cast<uint8_t*>(data), size, StreamMode::READ);
Graphic aGraphic;
(void)ImportGIF(aStream, aGraphic);
return 0;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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