Commit dcad0b1b authored by Philipp Schafft's avatar Philipp Schafft 🦁

Fix: Fixed a segfault when xsltApplyStylesheet() returns error

parent 32b4d549
......@@ -208,9 +208,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