1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 #include <tools/stream.hxx>
11 #include <vcl/FilterConfigItem.hxx>
12 #include "commonfuzzer.hxx"
14 #include <config_features.h>
15 #include <osl/detail/component-mapping.h>
18 void * i18npool_component_getFactory( const char* , void* , void* );
20 void com_sun_star_i18n_LocaleDataImpl_get_implementation( void );
21 void com_sun_star_i18n_BreakIterator_Unicode_get_implementation( void );
22 void com_sun_star_i18n_BreakIterator_get_implementation( void );
23 void com_sun_star_comp_framework_Desktop_get_implementation( void );
24 void com_sun_star_i18n_CharacterClassification_Unicode_get_implementation( void );
25 void com_sun_star_i18n_CharacterClassification_get_implementation( void );
26 void com_sun_star_i18n_NativeNumberSupplier_get_implementation( void );
27 void com_sun_star_i18n_NumberFormatCodeMapper_get_implementation( void );
28 void com_sun_star_i18n_Transliteration_get_implementation( void );
29 void com_sun_star_drawing_EnhancedCustomShapeEngine_get_implementation( void );
30 void com_sun_star_drawing_SvxShapeCollection_get_implementation( void );
31 void SfxDocumentMetaData_get_implementation( void );
32 void com_sun_star_animations_AnimateColor_get_implementation( void );
33 void com_sun_star_animations_AnimateMotion_get_implementation( void );
34 void com_sun_star_animations_AnimateSet_get_implementation( void );
35 void com_sun_star_animations_AnimateTransform_get_implementation( void );
36 void com_sun_star_animations_Animate_get_implementation( void );
37 void com_sun_star_animations_Audio_get_implementation( void );
38 void com_sun_star_animations_Command_get_implementation( void );
39 void com_sun_star_animations_IterateContainer_get_implementation( void );
40 void com_sun_star_animations_ParallelTimeContainer_get_implementation( void );
41 void com_sun_star_animations_SequenceTimeContainer_get_implementation( void );
42 void com_sun_star_animations_TransitionFilter_get_implementation( void );
43 void com_sun_star_comp_comphelper_OPropertyBag( void );
44 void com_sun_star_comp_uui_UUIInteractionHandler_get_implementation( void );
45 void emfio_emfreader_XEmfParser_get_implementation( void );
46 void unoxml_rdfRepository_get_implementation( void );
47 void unoxml_CURI_get_implementation( void );
48 void unoxml_CLiteral_get_implementation( void );
49 void unoxml_CBlankNode_get_implementation( void );
50 void unoxml_CXPathAPI_get_implementation( void );
51 void unoxml_CSAXDocumentBuilder_get_implementation( void );
52 void unoxml_CDocumentBuilder_get_implementation( void );
53 void linguistic_ConvDicList_get_implementation( void );
54 void linguistic_DicList_get_implementation( void );
55 void linguistic_LinguProps_get_implementation( void );
56 void linguistic_LngSvcMgr_get_implementation( void );
57 void linguistic_GrammarCheckingIterator_get_implementation( void );
58 void sd_DrawingDocument_get_implementation( void );
59 void com_sun_star_comp_Draw_DrawingModule_get_implementation( void );
60 void sd_PresentationDocument_get_implementation( void );
61 void com_sun_star_comp_Draw_PresenterHelper_get_implementation( void );
62 void com_sun_star_comp_Draw_PresenterPreviewCache_get_implementation( void );
63 void com_sun_star_comp_Draw_SlideRenderer_get_implementation( void );
64 void com_sun_star_comp_sd_InsertSlideController_get_implementation( void );
65 void com_sun_star_comp_sd_SlideLayoutController_get_implementation( void );
66 void com_sun_star_comp_sd_DisplayModeController_get_implementation( void );
67 void ucb_UcbCommandEnvironment_get_implementation( void );
68 void ucb_UcbContentProviderProxyFactory_get_implementation( void );
69 void ucb_UcbPropertiesManager_get_implementation( void );
70 void ucb_UcbStore_get_implementation( void );
71 void ucb_UniversalContentBroker_get_implementation( void );
72 void ucb_OFileAccess_get_implementation( void );
75 const lib_to_factory_mapping
*
76 lo_get_factory_map(void)
78 static lib_to_factory_mapping map
[] = {
79 { "libi18npoollo.a", i18npool_component_getFactory
},
86 const lib_to_constructor_mapping
*
87 lo_get_constructor_map(void)
89 static lib_to_constructor_mapping map
[] = {
90 { "com_sun_star_i18n_LocaleDataImpl_get_implementation", com_sun_star_i18n_LocaleDataImpl_get_implementation
},
91 { "com_sun_star_i18n_BreakIterator_Unicode_get_implementation", com_sun_star_i18n_BreakIterator_Unicode_get_implementation
},
92 { "com_sun_star_i18n_BreakIterator_get_implementation", com_sun_star_i18n_BreakIterator_get_implementation
},
93 { "com_sun_star_comp_framework_Desktop_get_implementation", com_sun_star_comp_framework_Desktop_get_implementation
},
94 { "com_sun_star_i18n_CharacterClassification_Unicode_get_implementation", com_sun_star_i18n_CharacterClassification_Unicode_get_implementation
},
95 { "com_sun_star_i18n_CharacterClassification_get_implementation", com_sun_star_i18n_CharacterClassification_get_implementation
},
96 { "com_sun_star_i18n_NativeNumberSupplier_get_implementation", com_sun_star_i18n_NativeNumberSupplier_get_implementation
},
97 { "com_sun_star_i18n_NumberFormatCodeMapper_get_implementation", com_sun_star_i18n_NumberFormatCodeMapper_get_implementation
},
98 { "com_sun_star_i18n_Transliteration_get_implementation", com_sun_star_i18n_Transliteration_get_implementation
},
99 { "com_sun_star_drawing_EnhancedCustomShapeEngine_get_implementation", com_sun_star_drawing_EnhancedCustomShapeEngine_get_implementation
},
100 { "com_sun_star_drawing_SvxShapeCollection_get_implementation", com_sun_star_drawing_SvxShapeCollection_get_implementation
},
101 { "SfxDocumentMetaData_get_implementation", SfxDocumentMetaData_get_implementation
},
102 { "com_sun_star_animations_AnimateColor_get_implementation", com_sun_star_animations_AnimateColor_get_implementation
},
103 { "com_sun_star_animations_AnimateMotion_get_implementation", com_sun_star_animations_AnimateMotion_get_implementation
},
104 { "com_sun_star_animations_AnimateSet_get_implementation", com_sun_star_animations_AnimateSet_get_implementation
},
105 { "com_sun_star_animations_AnimateTransform_get_implementation", com_sun_star_animations_AnimateTransform_get_implementation
},
106 { "com_sun_star_animations_Animate_get_implementation", com_sun_star_animations_Animate_get_implementation
},
107 { "com_sun_star_animations_Audio_get_implementation", com_sun_star_animations_Audio_get_implementation
},
108 { "com_sun_star_animations_Command_get_implementation", com_sun_star_animations_Command_get_implementation
},
109 { "com_sun_star_animations_IterateContainer_get_implementation", com_sun_star_animations_IterateContainer_get_implementation
},
110 { "com_sun_star_animations_ParallelTimeContainer_get_implementation", com_sun_star_animations_ParallelTimeContainer_get_implementation
},
111 { "com_sun_star_animations_SequenceTimeContainer_get_implementation", com_sun_star_animations_SequenceTimeContainer_get_implementation
},
112 { "com_sun_star_animations_TransitionFilter_get_implementation", com_sun_star_animations_TransitionFilter_get_implementation
},
113 { "com_sun_star_comp_comphelper_OPropertyBag", com_sun_star_comp_comphelper_OPropertyBag
},
114 { "com_sun_star_comp_uui_UUIInteractionHandler_get_implementation", com_sun_star_comp_uui_UUIInteractionHandler_get_implementation
},
115 { "emfio_emfreader_XEmfParser_get_implementation", emfio_emfreader_XEmfParser_get_implementation
},
116 { "unoxml_rdfRepository_get_implementation", unoxml_rdfRepository_get_implementation
},
117 { "unoxml_CURI_get_implementation", unoxml_CURI_get_implementation
},
118 { "unoxml_CLiteral_get_implementation", unoxml_CLiteral_get_implementation
},
119 { "unoxml_CBlankNode_get_implementation", unoxml_CBlankNode_get_implementation
},
120 { "unoxml_CXPathAPI_get_implementation", unoxml_CXPathAPI_get_implementation
},
121 { "unoxml_CSAXDocumentBuilder_get_implementation", unoxml_CSAXDocumentBuilder_get_implementation
},
122 { "unoxml_CDocumentBuilder_get_implementation", unoxml_CDocumentBuilder_get_implementation
},
123 { "linguistic_ConvDicList_get_implementation", linguistic_ConvDicList_get_implementation
},
124 { "linguistic_DicList_get_implementation", linguistic_DicList_get_implementation
},
125 { "linguistic_LinguProps_get_implementation", linguistic_LinguProps_get_implementation
},
126 { "linguistic_LngSvcMgr_get_implementation", linguistic_LngSvcMgr_get_implementation
},
127 { "linguistic_GrammarCheckingIterator_get_implementation", linguistic_GrammarCheckingIterator_get_implementation
},
128 { "sd_DrawingDocument_get_implementation", sd_DrawingDocument_get_implementation
},
129 { "com_sun_star_comp_Draw_DrawingModule_get_implementation", com_sun_star_comp_Draw_DrawingModule_get_implementation
},
130 { "sd_PresentationDocument_get_implementation", sd_PresentationDocument_get_implementation
},
131 { "com_sun_star_comp_Draw_PresenterHelper_get_implementation", com_sun_star_comp_Draw_PresenterHelper_get_implementation
},
132 { "com_sun_star_comp_Draw_PresenterPreviewCache_get_implementation", com_sun_star_comp_Draw_PresenterPreviewCache_get_implementation
},
133 { "com_sun_star_comp_Draw_SlideRenderer_get_implementation", com_sun_star_comp_Draw_SlideRenderer_get_implementation
},
134 { "com_sun_star_comp_sd_InsertSlideController_get_implementation", com_sun_star_comp_sd_InsertSlideController_get_implementation
},
135 { "com_sun_star_comp_sd_SlideLayoutController_get_implementation", com_sun_star_comp_sd_SlideLayoutController_get_implementation
},
136 { "com_sun_star_comp_sd_DisplayModeController_get_implementation", com_sun_star_comp_sd_DisplayModeController_get_implementation
},
137 { "ucb_UcbCommandEnvironment_get_implementation", ucb_UcbCommandEnvironment_get_implementation
, },
138 { "ucb_UcbContentProviderProxyFactory_get_implementation", ucb_UcbContentProviderProxyFactory_get_implementation
},
139 { "ucb_UcbPropertiesManager_get_implementation", ucb_UcbPropertiesManager_get_implementation
},
140 { "ucb_UcbStore_get_implementation", ucb_UcbStore_get_implementation
},
141 { "ucb_UniversalContentBroker_get_implementation", ucb_UniversalContentBroker_get_implementation
},
142 { "ucb_OFileAccess_get_implementation", ucb_OFileAccess_get_implementation
},
149 extern "C" void* lo_get_custom_widget_func(const char*)
154 extern "C" void* SdCreateDialogFactory()
159 extern "C" bool TestImportCGM(SvStream
&rStream
);
161 extern "C" int LLVMFuzzerInitialize(int *argc
, char ***argv
)
163 TypicalFuzzerInitialize(argc
, argv
);
168 extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data
, size_t size
)
170 SvMemoryStream
aStream(const_cast<uint8_t*>(data
), size
, StreamMode::READ
);
171 (void)TestImportCGM(aStream
);
175 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */