Coverage Report

Created: 2025-07-07 10:01

/src/libreoffice/vcl/workben/lwpfuzzer.cxx
Line
Count
Source (jump to first uncovered line)
1
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
/*
3
 * This file is part of the LibreOffice project.
4
 *
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/.
8
 */
9
10
#include <tools/stream.hxx>
11
#include <vcl/FilterConfigItem.hxx>
12
#include "commonfuzzer.hxx"
13
14
#include <config_features.h>
15
#include <osl/detail/component-mapping.h>
16
17
const lib_to_factory_mapping *
18
lo_get_factory_map(void)
19
0
{
20
0
    static lib_to_factory_mapping map[] = {
21
0
        { 0, 0 }
22
0
    };
23
24
0
    return map;
25
0
}
26
27
const lib_to_constructor_mapping *
28
lo_get_constructor_map(void)
29
379k
{
30
379k
    static lib_to_constructor_mapping map[] = {
31
379k
        { 0, 0 }
32
379k
    };
33
34
379k
    return map;
35
379k
}
36
37
extern "C" void* lo_get_custom_widget_func(const char*)
38
0
{
39
0
    return nullptr;
40
0
}
41
42
extern "C" bool TestImportLWP(SvStream &rStream);
43
44
extern "C" int LLVMFuzzerInitialize(int *argc, char ***argv)
45
92
{
46
92
    TypicalFuzzerInitialize(argc, argv);
47
92
    return 0;
48
92
}
49
50
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
51
440k
{
52
440k
    SvMemoryStream aStream(const_cast<uint8_t*>(data), size, StreamMode::READ);
53
440k
    (void)TestImportLWP(aStream);
54
440k
    return 0;
55
440k
}
56
57
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */