1
0
mirror of https://gitlab.gnome.org/GNOME/libxslt synced 2025-08-07 10:42:55 +03:00
Files
libxslt/tests/fuzz/xpath.c
Nick Wellnhofer 311da8c886 Reorganize fuzzing code
- Move core fuzzing code into a single file fuzz.c
- Add tests for fuzz targets
- Reduce XSLT operation limit
2019-05-08 12:21:50 +02:00

21 lines
418 B
C

/*
* xpath.c: libFuzzer target for XPath expressions
*
* See Copyright for the status of this software.
*/
#include "fuzz.h"
int
LLVMFuzzerInitialize(int *argc_p, char ***argv_p) {
return xsltFuzzXPathInit(argc_p, argv_p, NULL);
}
int
LLVMFuzzerTestOneInput(const char *data, size_t size) {
xmlXPathObjectPtr xpathObj = xsltFuzzXPath(data, size);
xsltFuzzXPathFreeObject(xpathObj);
return 0;
}