mirror of
https://gitlab.gnome.org/GNOME/libxslt
synced 2025-08-01 14:06:55 +03:00
- Fuzz with multiple inputs. - Generate XSLT seed corpus from tests. - Inject malloc failures. Fixes #84.
23 lines
448 B
C
23 lines
448 B
C
/*
|
|
* xslt.c: libFuzzer target for XSLT stylesheets
|
|
*
|
|
* See Copyright for the status of this software.
|
|
*/
|
|
|
|
#include "fuzz.h"
|
|
#include <libxml/globals.h>
|
|
|
|
int
|
|
LLVMFuzzerInitialize(int *argc_p ATTRIBUTE_UNUSED,
|
|
char ***argv_p ATTRIBUTE_UNUSED) {
|
|
return xsltFuzzXsltInit();
|
|
}
|
|
|
|
int
|
|
LLVMFuzzerTestOneInput(const char *data, size_t size) {
|
|
xmlChar *result = xsltFuzzXslt(data, size);
|
|
xmlFree(result);
|
|
|
|
return 0;
|
|
}
|