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()

void exercise_aggregator_predicates | ( | const ada::url_aggregator & | u | ) |

static

Definition at line 122 of file parse.cc.

References ada::url_aggregator::get_components(), ada::url_aggregator::get_hash(), ada::url_aggregator::get_host(), ada::url_aggregator::get_hostname(), ada::url_aggregator::get_href(), ada::url_aggregator::get_origin(), ada::url_aggregator::get_password(), ada::url_aggregator::get_pathname(), ada::url_aggregator::get_pathname_length(), ada::url_aggregator::get_port(), ada::url_aggregator::get_protocol(), ada::url_aggregator::get_search(), ada::url_aggregator::get_username(), ada::url_aggregator::has_credentials(), ada::url_aggregator::has_empty_hostname(), ada::url_aggregator::has_hash(), ada::url_aggregator::has_hostname(), ada::url_aggregator::has_non_empty_password(), ada::url_aggregator::has_non_empty_username(), ada::url_aggregator::has_password(), ada::url_aggregator::has_port(), ada::url_aggregator::has_search(), ada::url_aggregator::has_valid_domain(), ada::url_aggregator::to_diagram(), ada::url_aggregator::to_string(), and ada::url_aggregator::validate().

Referenced by LLVMFuzzerTestOneInput().

## exercise_url_predicates()

void exercise_url_predicates | ( | const ada::url & | u | ) |

static

Definition at line 96 of file parse.cc.

References ada::url::get_components(), ada::url::get_hash(), ada::url::get_host(), ada::url::get_hostname(), ada::url::get_href(), ada::url::get_origin(), ada::url::get_password(), ada::url::get_pathname(), ada::url::get_pathname_length(), ada::url::get_port(), ada::url::get_protocol(), ada::url::get_search(), ada::url::get_username(), ada::url::has_credentials(), ada::url::has_empty_hostname(), ada::url::has_hash(), ada::url::has_hostname(), ada::url::has_port(), ada::url::has_search(), ada::url::has_valid_domain(), and ada::url::to_string().

Referenced by LLVMFuzzerTestOneInput().

## 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().