Coverage Report

Created: 2025-11-24 06:30

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/wt/fuzz/fuzz-css.C
Line
Count
Source
1
/*
2
 * Copyright (C) 2023 Emweb bv, Herent, Belgium.
3
 *
4
 * See the LICENSE file for terms of use.
5
 */
6
7
#include <stdint.h>
8
#include <stddef.h>
9
#include <string>
10
11
#include <Wt/Render/CssParser.h>
12
#include <iostream>
13
14
15
9.06k
#define kMinInputLength 10
16
4.51k
#define kMaxInputLength 5120
17
18
19
4.53k
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
20
21
4.53k
    if (Size < kMinInputLength || Size > kMaxInputLength) {
22
70
        return 1;
23
70
    }
24
25
4.46k
    std::string input(Data, Data + Size);
26
4.46k
    Wt::Render::CssParser parser;
27
4.46k
    parser.parse(input);
28
29
4.46k
    return 0;
30
4.53k
}