blob: 357028556a720e54c29e3b6fa8c95adc7a3ef70a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
/*
* fuzz.h: Common functions and macros for fuzzing.
*
* See Copyright for the status of this software.
*/
#ifndef __XML_FUZZERCOMMON_H__
#define __XML_FUZZERCOMMON_H__
#include <stddef.h>
#include <libxml/parser.h>
#ifdef __cplusplus
extern "C" {
#endif
int
LLVMFuzzerInitialize(int *argc, char ***argv);
int
LLVMFuzzerTestOneInput(const char *data, size_t size);
void
xmlFuzzErrorFunc(void *ctx ATTRIBUTE_UNUSED, const char *msg ATTRIBUTE_UNUSED,
...);
void
xmlFuzzDataInit(const char *data, size_t size);
void
xmlFuzzDataCleanup(void);
int
xmlFuzzReadInt(void);
const char *
xmlFuzzReadRemaining(size_t *size);
void
xmlFuzzReadEntities(void);
const char *
xmlFuzzMainEntity(size_t *size);
xmlParserInputPtr
xmlFuzzEntityLoader(const char *URL, const char *ID ATTRIBUTE_UNUSED,
xmlParserCtxtPtr ctxt);
size_t
xmlFuzzExtractStrings(const char *data, size_t size, char **strings,
size_t numStrings);
#ifdef __cplusplus
}
#endif
#endif /* __XML_FUZZERCOMMON_H__ */
|