File: fuzz_header_parsing.c

package info (click to toggle)
libsoup3 3.6.5-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 7,436 kB
  • sloc: ansic: 61,976; python: 202; xml: 97; sh: 84; makefile: 33; javascript: 5
file content (19 lines) | stat: -rw-r--r-- 397 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include "fuzz.h"

int
LLVMFuzzerTestOneInput (const unsigned char *data, size_t size)
{
        GHashTable *elements;

        // We only accept NUL terminated strings
        if (!size || data[size - 1] != '\0')
                return 0;

        fuzz_set_logging_func ();

        elements = soup_header_parse_param_list((char*)data);

        g_hash_table_unref(elements);

        return 0;
}