Coverage Report

Created: 2026-02-09 06:40

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.61k
#define kMinInputLength 10
16
4.78k
#define kMaxInputLength 5120
17
18
19
4.80k
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
20
21
4.80k
    if (Size < kMinInputLength || Size > kMaxInputLength) {
22
67
        return 1;
23
67
    }
24
25
4.73k
    std::string input(Data, Data + Size);
26
4.73k
    Wt::Render::CssParser parser;
27
4.73k
    parser.parse(input);
28
29
4.73k
    return 0;
30
4.80k
}