]>
git.proxmox.com Git - ceph.git/blob - ceph/src/c-ares/test/ares-test-fuzz-name.c
6 // Include ares internal file for DNS protocol constants
9 // Entrypoint for Clang's libfuzzer, exercising query creation.
10 int LLVMFuzzerTestOneInput(const unsigned char *data
,
12 // Null terminate the data.
13 char *name
= malloc(size
+ 1);
15 memcpy(name
, data
, size
);
17 unsigned char *buf
= NULL
;
19 ares_create_query(name
, ns_c_in
, ns_t_aaaa
, 1234, 0, &buf
, &buflen
, 1024);