Coverage Report

Created: 2025-11-24 06:30

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/wt/fuzz/fuzz-uri.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/WApplication.h>
12
#include <Wt/WIOService.h>
13
#include <Wt/Http/Client.h>
14
15
9.06k
#define kMinInputLength 10
16
4.51k
#define kMaxInputLength 5120
17
18
4.53k
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
19
20
4.53k
    if (Size < kMinInputLength || Size > kMaxInputLength) {
21
70
        return 1;
22
70
    }
23
24
4.46k
    std::string input(Data, Data + Size);
25
26
4.46k
    Wt::Http::Client::URL url;
27
4.46k
    Wt::Http::Client::parseUrl(input, url);
28
29
4.46k
    return 0;
30
4.53k
}