Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
d8c5cc7c
Kaydet (Commit)
d8c5cc7c
authored
Mar 24, 2017
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
add rtf fuzzer
Change-Id: I36a6294c158232bef8fceeaf5159527f467f5786
üst
6a947848
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
106 additions
and
31 deletions
+106
-31
Makefile.in
Makefile.in
+1
-1
Repository.mk
Repository.mk
+1
-0
Library_sw.mk
sw/Library_sw.mk
+6
-6
shellio.hxx
sw/inc/shellio.hxx
+2
-2
swparrtf.cxx
sw/source/filter/rtf/swparrtf.cxx
+2
-4
apphdl.cxx
sw/source/uibase/app/apphdl.cxx
+2
-2
uivwimp.hxx
sw/source/uibase/inc/uivwimp.hxx
+0
-4
uivwimp.cxx
sw/source/uibase/uiview/uivwimp.cxx
+0
-2
view0.cxx
sw/source/uibase/uiview/view0.cxx
+0
-4
CustomTarget_nativecode.mk
vcl/CustomTarget_nativecode.mk
+1
-1
Executable_rtffuzzer.mk
vcl/Executable_rtffuzzer.mk
+47
-0
Module_vcl.mk
vcl/Module_vcl.mk
+2
-1
commonfuzzer.mk
vcl/commonfuzzer.mk
+5
-0
fftester.cxx
vcl/workben/fftester.cxx
+4
-4
rtffuzzer.cxx
vcl/workben/rtffuzzer.cxx
+33
-0
No files found.
Makefile.in
Dosyayı görüntüle @
d8c5cc7c
...
...
@@ -446,7 +446,7 @@ $(foreach ide,\
eclipsecdt,\
$(eval
$(call
gb_Top_GbuildToIdeIntegrationNS,$(ide))))
fuzzers
:
Library_sal Library_salhelper Library_reg Library_store Library_unoidl codemaker Library_cppu Library_i18nlangtag Library_cppuhelper Library_comphelper StaticLibrary_ulingu StaticLibrary_findsofficepath Library_tl Library_basegfx Library_canvastools Library_cppcanvas Library_dbtools Library_deploymentmisc Library_deploymentmisc Library_editeng Library_fwe Library_fwi Library_i18nutil Library_localebe1 Library_sax Library_sofficeapp Library_ucbhelper Library_opencl Rdb_services udkapi offapi Library_clew Library_gie Library_icg 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 Executable_psdfuzzer Executable_epsfuzzer Executable_pctfuzzer Executable_pcxfuzzer Executable_rasfuzzer Executable_tgafuzzer Executable_tiffuzzer Executable_hwpfuzzer Executable_602fuzzer Executable_lwpfuzzer Executable_olefuzzer AllLangResTarget_sd Executable_pptfuzzer
fuzzers
:
Library_sal Library_salhelper Library_reg Library_store Library_unoidl codemaker Library_cppu Library_i18nlangtag Library_cppuhelper Library_comphelper StaticLibrary_ulingu StaticLibrary_findsofficepath Library_tl Library_basegfx Library_canvastools Library_cppcanvas Library_dbtools Library_deploymentmisc Library_deploymentmisc Library_editeng Library_fwe Library_fwi Library_i18nutil Library_localebe1 Library_sax Library_sofficeapp Library_ucbhelper Library_opencl Rdb_services udkapi offapi Library_clew Library_gie Library_icg 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 Executable_psdfuzzer Executable_epsfuzzer Executable_pctfuzzer Executable_pcxfuzzer Executable_rasfuzzer Executable_tgafuzzer Executable_tiffuzzer Executable_hwpfuzzer Executable_602fuzzer Executable_lwpfuzzer Executable_olefuzzer AllLangResTarget_sd Executable_pptfuzzer
Executable_rtffuzzer
endif
# MAKE_RESTARTS
...
...
Repository.mk
Dosyayı görüntüle @
d8c5cc7c
...
...
@@ -117,6 +117,7 @@ $(eval $(call gb_Helper_register_executables_for_install,OOO,brand, \
$(call gb_Helper_optional,FUZZERS,lwpfuzzer) \
$(call gb_Helper_optional,FUZZERS,olefuzzer) \
$(call gb_Helper_optional,FUZZERS,pptfuzzer) \
$(call gb_Helper_optional,FUZZERS,rtffuzzer) \
$(if $(filter-out ANDROID IOS MACOSX WNT,$(OS)),oosplash) \
soffice_bin \
$(if $(filter DESKTOP,$(BUILD_TYPE)),unopkg_bin) \
...
...
sw/Library_sw.mk
Dosyayı görüntüle @
d8c5cc7c
...
...
@@ -571,6 +571,11 @@ $(eval $(call gb_Library_add_exception_objects,sw,\
sw/source/uibase/app/swmodul1 \
sw/source/uibase/app/swmodule \
sw/source/uibase/app/swwait \
sw/source/uibase/dbui/dbmgr \
sw/source/uibase/dbui/dbui \
sw/source/uibase/dbui/maildispatcher \
sw/source/uibase/dbui/mailmergehelper \
sw/source/uibase/dbui/mmconfigitem \
sw/source/uibase/cctrl/actctrl \
sw/source/uibase/chrdlg/ccoll \
sw/source/uibase/config/StoredChapterNumbering \
...
...
@@ -722,6 +727,7 @@ $(eval $(call gb_Library_add_exception_objects,sw,\
sw/source/uibase/uno/unodispatch \
sw/source/uibase/uno/unodoc \
sw/source/uibase/uno/unofreg \
sw/source/uibase/uno/unomailmerge \
sw/source/uibase/uno/unomod \
sw/source/uibase/uno/unomodule \
sw/source/uibase/uno/unotxdoc \
...
...
@@ -768,14 +774,8 @@ $(eval $(call gb_Library_add_exception_objects,sw,\
ifneq (,$(filter DBCONNECTIVITY,$(BUILD_TYPE)))
$(eval $(call gb_Library_add_exception_objects,sw,\
sw/source/uibase/dbui/dbmgr \
sw/source/uibase/dbui/dbtree \
sw/source/uibase/dbui/dbui \
sw/source/uibase/dbui/maildispatcher \
sw/source/uibase/dbui/mailmergehelper \
sw/source/uibase/dbui/mailmergetoolbarcontrols \
sw/source/uibase/dbui/mmconfigitem \
sw/source/uibase/uno/unomailmerge \
))
endif
...
...
sw/inc/shellio.hxx
Dosyayı görüntüle @
d8c5cc7c
...
...
@@ -178,13 +178,13 @@ protected:
#define SW_STORAGE_READER 2
extern
"C"
SAL_DLLPUBLIC_EXPORT
bool
SAL_CALL
TestImportDOC
(
const
OUString
&
rUrl
,
const
OUString
&
rFltName
);
extern
"C"
SAL_DLLPUBLIC_EXPORT
bool
SAL_CALL
TestImportRTF
(
const
OUString
&
rUrl
);
extern
"C"
SAL_DLLPUBLIC_EXPORT
bool
SAL_CALL
TestImportRTF
(
SvStream
&
rStream
);
class
SW_DLLPUBLIC
Reader
{
friend
class
SwReader
;
friend
bool
TestImportDOC
(
const
OUString
&
rUrl
,
const
OUString
&
rFltName
);
friend
bool
TestImportRTF
(
const
OUString
&
rUrl
);
friend
bool
TestImportRTF
(
SvStream
&
rStream
);
rtl
::
Reference
<
SwDoc
>
mxTemplate
;
OUString
aTemplateNm
;
...
...
sw/source/filter/rtf/swparrtf.cxx
Dosyayı görüntüle @
d8c5cc7c
...
...
@@ -158,10 +158,8 @@ extern "C" SAL_DLLPUBLIC_EXPORT Reader* SAL_CALL ImportRTF()
return
new
SwRTFReader
;
}
extern
"C"
SAL_DLLPUBLIC_EXPORT
bool
SAL_CALL
TestImportRTF
(
const
OUString
&
rURL
)
extern
"C"
SAL_DLLPUBLIC_EXPORT
bool
SAL_CALL
TestImportRTF
(
SvStream
&
rStream
)
{
SvFileStream
aFileStream
(
rURL
,
StreamMode
::
READ
);
SwGlobals
::
ensure
();
SfxObjectShellLock
xDocSh
(
new
SwDocShell
(
SfxObjectCreateMode
::
INTERNAL
));
...
...
@@ -177,7 +175,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT bool SAL_CALL TestImportRTF(const OUString& rURL
uno
::
Reference
<
document
::
XFilter
>
xFilter
(
xInterface
,
uno
::
UNO_QUERY_THROW
);
uno
::
Sequence
<
beans
::
PropertyValue
>
aDescriptor
(
1
);
aDescriptor
[
0
].
Name
=
"InputStream"
;
uno
::
Reference
<
io
::
XStream
>
xStream
(
new
utl
::
OStreamWrapper
(
aFile
Stream
));
uno
::
Reference
<
io
::
XStream
>
xStream
(
new
utl
::
OStreamWrapper
(
r
Stream
));
aDescriptor
[
0
].
Value
<<=
xStream
;
bool
bRet
=
true
;
try
...
...
sw/source/uibase/app/apphdl.cxx
Dosyayı görüntüle @
d8c5cc7c
...
...
@@ -241,8 +241,6 @@ void SwModule::StateOther(SfxItemSet &rSet)
// start field dialog
void
NewXForms
(
SfxRequest
&
rReq
);
// implementation: below
#if HAVE_FEATURE_DBCONNECTIVITY
std
::
shared_ptr
<
SwMailMergeConfigItem
>
SwView
::
EnsureMailMergeConfigItem
(
const
SfxItemSet
*
pArgs
,
sal_uInt16
nWizardRestartPage
)
{
// create if it does not exist yet
...
...
@@ -305,6 +303,8 @@ std::shared_ptr<SwMailMergeConfigItem> SwView::EnsureMailMergeConfigItem(const S
return
xMMConfig
;
}
#if HAVE_FEATURE_DBCONNECTIVITY
namespace
{
...
...
sw/source/uibase/inc/uivwimp.hxx
Dosyayı görüntüle @
d8c5cc7c
...
...
@@ -101,11 +101,9 @@ class SwView_Impl
mxClipEvtLstnr
;
ShellMode
eShellMode
;
#if HAVE_FEATURE_DBCONNECTIVITY
std
::
shared_ptr
<
SwMailMergeConfigItem
>
xConfigItem
;
sal_uInt16
nMailMergeRestartPage
;
#endif
sfx2
::
DocumentInserter
*
m_pDocInserter
;
SfxRequest
*
m_pRequest
;
...
...
@@ -137,14 +135,12 @@ public:
void
AddTransferable
(
SwTransferable
&
rTransferable
);
#if HAVE_FEATURE_DBCONNECTIVITY
void
SetMailMergeConfigItem
(
std
::
shared_ptr
<
SwMailMergeConfigItem
>&
rItem
,
sal_uInt16
nRestart
)
{
xConfigItem
=
rItem
;
nMailMergeRestartPage
=
nRestart
;
}
std
::
shared_ptr
<
SwMailMergeConfigItem
>
GetMailMergeConfigItem
()
{
return
xConfigItem
;}
#endif
//#i33307# restore editing position
void
SetRestorePosition
(
const
Point
&
rCursorPos
,
bool
bSelectObj
)
...
...
sw/source/uibase/uiview/uivwimp.cxx
Dosyayı görüntüle @
d8c5cc7c
...
...
@@ -56,9 +56,7 @@ SwView_Impl::SwView_Impl(SwView* pShell)
:
mxXTextView
()
,
pView
(
pShell
)
,
eShellMode
(
ShellMode
::
Text
)
#if HAVE_FEATURE_DBCONNECTIVITY
,
nMailMergeRestartPage
(
0
)
#endif
,
m_pDocInserter
(
nullptr
)
,
m_pRequest
(
nullptr
)
,
m_nParam
(
0
)
...
...
sw/source/uibase/uiview/view0.cxx
Dosyayı görüntüle @
d8c5cc7c
...
...
@@ -131,8 +131,6 @@ void SwView::ApplyAccessiblityOptions(SvtAccessibilityOptions& rAccessibilityOpt
}
#if HAVE_FEATURE_DBCONNECTIVITY
void
SwView
::
SetMailMergeConfigItem
(
std
::
shared_ptr
<
SwMailMergeConfigItem
>&
rConfigItem
,
sal_uInt16
nRestart
)
{
...
...
@@ -145,8 +143,6 @@ std::shared_ptr<SwMailMergeConfigItem> SwView::GetMailMergeConfigItem() const
return
m_pViewImpl
->
GetMailMergeConfigItem
();
}
#endif
static
bool
lcl_IsViewMarks
(
const
SwViewOption
&
rVOpt
)
{
return
rVOpt
.
IsHardBlank
()
&&
...
...
vcl/CustomTarget_nativecode.mk
Dosyayı görüntüle @
d8c5cc7c
...
...
@@ -13,6 +13,6 @@ fuzzer_PYTHONCOMMAND := $(call gb_ExternalExecutable_get_command,python)
fuzzer_Native_cxx=$(call gb_CustomTarget_get_workdir,vcl/workben)/native-code.cxx
$(fuzzer_Native_cxx): $(SRCDIR)/solenv/bin/native-code.py | $(call gb_CustomTarget_get_workdir,vcl/workben)/.dir
$(call gb_Helper_abbreviate_dirs, $(fuzzer_PYTHONCOMMAND) $(SRCDIR)/solenv/bin/native-code.py -g core -g draw) > $@
$(call gb_Helper_abbreviate_dirs, $(fuzzer_PYTHONCOMMAND) $(SRCDIR)/solenv/bin/native-code.py -g core -g draw
-g writer
) > $@
# vim: set noet sw=4 ts=4:
vcl/Executable_rtffuzzer.mk
0 → 100644
Dosyayı görüntüle @
d8c5cc7c
# -*- 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,rtffuzzer))
$(eval $(call gb_Executable_use_api,rtffuzzer,\
offapi \
udkapi \
))
$(eval $(call gb_Executable_use_externals,rtffuzzer,\
$(fuzzer_externals) \
))
$(eval $(call gb_Executable_set_include,rtffuzzer,\
$$(INCLUDE) \
-I$(SRCDIR)/vcl/inc \
))
$(eval $(call gb_Executable_use_libraries,rtffuzzer,\
$(fuzzer_libraries) \
))
$(eval $(call gb_Executable_use_static_libraries,rtffuzzer,\
findsofficepath \
ulingu \
fuzzer \
))
$(eval $(call gb_Executable_add_exception_objects,rtffuzzer,\
vcl/workben/rtffuzzer \
))
$(eval $(call gb_Executable_add_libs,rtffuzzer,\
-lFuzzingEngine \
))
# vim: set noet sw=4 ts=4:
vcl/Module_vcl.mk
Dosyayı görüntüle @
d8c5cc7c
...
...
@@ -129,7 +129,8 @@ $(eval $(call gb_Module_add_targets,vcl,\
Executable_602fuzzer \
Executable_lwpfuzzer \
Executable_olefuzzer \
Executable_pptfuzzer \
Executable_pptfuzzer \
Executable_rtffuzzer \
))
endif
...
...
vcl/commonfuzzer.mk
Dosyayı görüntüle @
d8c5cc7c
...
...
@@ -38,6 +38,11 @@ fuzzer_externals = \
zlib \
fuzzer_libraries = \
msword \
sw \
swd \
writerfilter \
textfd \
sdfilt \
sd \
sdd \
...
...
vcl/workben/fftester.cxx
Dosyayı görüntüle @
d8c5cc7c
...
...
@@ -67,7 +67,6 @@ extern "C" { static void SAL_CALL thisModule() {} }
#endif
typedef
bool
(
*
WFilterCall
)(
const
OUString
&
rUrl
,
const
OUString
&
rFlt
);
typedef
bool
(
*
HFilterCall
)(
const
OUString
&
rUrl
);
typedef
bool
(
*
FFilterCall
)(
SvStream
&
rStream
);
/* This constant specifies the number of inputs to process before restarting.
...
...
@@ -349,16 +348,17 @@ try_again:
}
else
if
(
strcmp
(
argv
[
2
],
"rtf"
)
==
0
)
{
static
H
FilterCall
pfnImport
(
nullptr
);
static
F
FilterCall
pfnImport
(
nullptr
);
if
(
!
pfnImport
)
{
osl
::
Module
aLibrary
;
aLibrary
.
loadRelative
(
&
thisModule
,
"libmswordlo.so"
,
SAL_LOADMODULE_LAZY
);
pfnImport
=
reinterpret_cast
<
H
FilterCall
>
(
pfnImport
=
reinterpret_cast
<
F
FilterCall
>
(
aLibrary
.
getFunctionSymbol
(
"TestImportRTF"
));
aLibrary
.
release
();
}
ret
=
(
int
)
(
*
pfnImport
)(
out
);
SvFileStream
aFileStream
(
out
,
StreamMode
::
READ
);
ret
=
(
int
)
(
*
pfnImport
)(
aFileStream
);
}
else
if
(
(
strcmp
(
argv
[
2
],
"xls"
)
==
0
)
||
(
strcmp
(
argv
[
2
],
"wb2"
)
==
0
)
)
...
...
vcl/workben/rtffuzzer.cxx
0 → 100644
Dosyayı görüntüle @
d8c5cc7c
/* -*- 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
TestImportRTF
(
SvStream
&
rStream
);
extern
"C"
int
LLVMFuzzerInitialize
(
int
*
argc
,
char
***
argv
)
{
TypicalFuzzerInitialize
(
argc
,
argv
);
return
0
;
}
extern
"C"
int
LLVMFuzzerTestOneInput
(
const
uint8_t
*
data
,
size_t
size
)
{
SvMemoryStream
aStream
(
const_cast
<
uint8_t
*>
(
data
),
size
,
StreamMode
::
READ
);
(
void
)
TestImportRTF
(
aStream
);
//fontconfigs alloc mechanism is too complicated for lsan/valgrind so
//force the fontconfig options to be released now, they are demand loaded
//so will be recreated if necessary
SvpSalGraphics
::
getPlatformGlyphCache
().
ClearFontOptions
();
return
0
;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment