Hash :
eac1c7e2
Author :
Date :
2020-06-21T14:42:00
Fuzz target for XML Schemas This only tests the schema parser for now.
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
/*
* 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);
xmlParserInputPtr
xmlFuzzEntityRecorder(const char *URL, const char *ID, xmlParserCtxtPtr ctxt);
void
xmlFuzzReadEntities(void);
const char *
xmlFuzzMainUrl(void);
const char *
xmlFuzzMainEntity(size_t *size);
xmlParserInputPtr
xmlFuzzEntityLoader(const char *URL, const char *ID, xmlParserCtxtPtr ctxt);
size_t
xmlFuzzExtractStrings(const char *data, size_t size, char **strings,
size_t numStrings);
#ifdef __cplusplus
}
#endif
#endif /* __XML_FUZZERCOMMON_H__ */