Ada 3.4.4
Fast spec-compliant URL parser
Loading...
Searching...
No Matches
parse.cc File Reference
#include <fuzzer/FuzzedDataProvider.h>
#include <cassert>
#include <cstdio>
#include <memory>
#include <string>
#include "ada.cpp"
#include "ada.h"

Go to the source code of this file.

Functions

bool is_valid_utf8_string (const char *buf, size_t len)
static void exercise_url_predicates (const ada::url &u)
static void exercise_aggregator_predicates (const ada::url_aggregator &u)
int LLVMFuzzerTestOneInput (const uint8_t *data, size_t size)

Function Documentation

◆ exercise_aggregator_predicates()

◆ exercise_url_predicates()

◆ is_valid_utf8_string()

bool is_valid_utf8_string ( const char * buf,
size_t len )

Definition at line 11 of file parse.cc.

Referenced by LLVMFuzzerTestOneInput().

◆ LLVMFuzzerTestOneInput()

int LLVMFuzzerTestOneInput ( const uint8_t * data,
size_t size )

Test copy and move semantics

ada::parse<ada::url>

ada::parse<ada::url_aggregator>

Relative URL parsing with base (tests the base URL resolution code path)

Chained relative URL resolution: parse source against base, then use the result as the base for a second parse. Exercises multi-level inheritance.

Known-good base URL with fuzzed relative input. Using a fixed valid base lets the fuzzer focus entropy entirely on the relative-input code paths (path resolution, query/fragment inheritance, scheme-relative URLs, etc.)

Node.js specific

Others

Definition at line 153 of file parse.cc.

References exercise_aggregator_predicates(), exercise_url_predicates(), ada::url::get_href(), ada::url_aggregator::get_href(), ada::href_from_file(), is_valid_utf8_string(), and ada::parse().