Commit 5d603a01 authored by Philipp Schafft's avatar Philipp Schafft 🦁

Fix: Fixed a segfault when xsltApplyStylesheet() returns error

parent fb3678b0
Pipeline #120 passed with stage
in 46 seconds
......@@ -311,9 +311,12 @@ void xslt_transform(xmlDocPtr doc, const char *xslfilename, client_t *client)
}
res = xsltApplyStylesheet(cur, doc, NULL);
if (xsltSaveResultToString (&string, &len, res, cur) < 0)
if (res != NULL) {
if (xsltSaveResultToString(&string, &len, res, cur) < 0)
problem = 1;
} else {
problem = 1;
}
/* lets find out the content type and character encoding to use */
if (cur->encoding)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment