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

Go to the source code of this file.

Functions

template<class T>
static void check_length (const T &url, const char *context)
int LLVMFuzzerTestOneInput (const uint8_t *data, size_t size)

Variables

static constexpr uint32_t kMaxLength = 512

Function Documentation

◆ check_length()

template<class T>
void check_length ( const T & url,
const char * context )
static

Definition at line 17 of file max_length.cc.

References kMaxLength.

Referenced by LLVMFuzzerTestOneInput().

◆ LLVMFuzzerTestOneInput()

int LLVMFuzzerTestOneInput ( const uint8_t * data,
size_t size )

Definition at line 30 of file max_length.cc.

References check_length(), kMaxLength, ada::parse(), and ada::set_max_input_length().

Variable Documentation

◆ kMaxLength

uint32_t kMaxLength = 512
staticconstexpr

Definition at line 14 of file max_length.cc.

Referenced by check_length(), and LLVMFuzzerTestOneInput().