File: fuzz.h

package info (click to toggle)
libxslt 1.1.43-0.2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 25,188 kB
  • sloc: xml: 66,120; ansic: 36,035; sh: 4,582; python: 3,206; makefile: 1,378; javascript: 470; perl: 34
file content (98 lines) | stat: -rw-r--r-- 1,599 bytes parent folder | download
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
/*
 * xpath.h: Header for fuzz targets
 *
 * See Copyright for the status of this software.
 */

#ifndef __XML_XSLT_TESTS_FUZZ_H__
#define __XML_XSLT_TESTS_FUZZ_H__

#include <stddef.h>
#include <libxml/xmlstring.h>
#include <libxml/xpath.h>

#ifdef __GNUC__
#define ATTRIBUTE_UNUSED __attribute__((unused))
#else
#define ATTRIBUTE_UNUSED
#endif

int
LLVMFuzzerInitialize(int *argc, char ***argv);

int
LLVMFuzzerTestOneInput(const char *data, size_t size);

int
xsltFuzzXPathInit(void);

xmlXPathObjectPtr
xsltFuzzXPath(const char *data, size_t size);

void
xsltFuzzXPathFreeObject(xmlXPathObjectPtr obj);

void
xsltFuzzXPathCleanup(void);

int
xsltFuzzXsltInit(void);

xmlChar *
xsltFuzzXslt(const char *data, size_t size);

void
xsltFuzzXsltCleanup(void);

/* Utility functions */

void
xmlFuzzErrorFunc(void *ctx ATTRIBUTE_UNUSED, const char *msg ATTRIBUTE_UNUSED,
                 ...);

void
xmlFuzzMemSetup(void);

void
xmlFuzzMemSetLimit(size_t limit);

void
xmlFuzzDataInit(const char *data, size_t size);

void
xmlFuzzDataCleanup(void);

void
xmlFuzzWriteInt(FILE *out, size_t v, int size);

size_t
xmlFuzzReadInt(int size);

const char *
xmlFuzzReadRemaining(size_t *size);

void
xmlFuzzWriteString(FILE *out, const char *str);

const char *
xmlFuzzReadString(size_t *size);

void
xmlFuzzReadEntities(void);

const char *
xmlFuzzMainUrl(void);

const char *
xmlFuzzMainEntity(size_t *size);

const char *
xmlFuzzSecondaryUrl(void);

const char *
xmlFuzzSecondaryEntity(size_t *size);

xmlParserInputPtr
xmlFuzzEntityLoader(const char *URL, const char *ID, xmlParserCtxtPtr ctxt);

#endif