summaryrefslogtreecommitdiff
path: root/tests/fuzz/xslt.c
blob: 42ba788165f807f454ab03242fe6f61e4faefdd1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/*
 * 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, char ***argv_p) {
    return xsltFuzzXsltInit(argc_p, argv_p, NULL);
}

int
LLVMFuzzerTestOneInput(const char *data, size_t size) {
    xmlChar *result = xsltFuzzXslt(data, size);
    xmlFree(result);

    return 0;
}