This source file includes following definitions.
- LLVMFuzzerTestOneInput
1
2
3
4
5
6
7
8
9
10 #include <stdint.h>
11 #include <stdlib.h>
12 #include <stdio.h>
13 #include <strings.h>
14 #include <glib.h>
15
16 #include <crm/common/options.h>
17 #include <crm/common/util.h>
18 #include <crm/common/internal.h>
19
20 int
21 LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
22 {
23 char *ns = NULL;
24 guint res = 0U;
25
26 if (size < 10) {
27 return -1;
28 }
29 ns = pcmk__assert_alloc(1, size + 1);
30 memcpy(ns, data, size);
31 ns[size] = '\0';
32
33 pcmk__numeric_strcasecmp(ns, ns);
34 pcmk__trim(ns);
35 pcmk_parse_interval_spec(ns, &res);
36 crm_get_msec(ns);
37
38 free(ns);
39 return 0;
40 }