1
0
mirror of https://gitlab.xiph.org/xiph/icecast-server.git synced 2024-11-03 04:17:17 -05:00

Fix: Fixed a segfault when xsltApplyStylesheet() returns error

This commit is contained in:
Philipp Schafft 2018-05-05 06:41:29 +00:00
parent 32b4d549e9
commit dcad0b1b5d

View File

@ -208,9 +208,12 @@ void xslt_transform(xmlDocPtr doc, const char *xslfilename, client_t *client)
} }
res = xsltApplyStylesheet(cur, doc, NULL); res = xsltApplyStylesheet(cur, doc, NULL);
if (res != NULL) {
if (xsltSaveResultToString(&string, &len, res, cur) < 0) if (xsltSaveResultToString(&string, &len, res, cur) < 0)
problem = 1; problem = 1;
} else {
problem = 1;
}
/* lets find out the content type and character encoding to use */ /* lets find out the content type and character encoding to use */
if (cur->encoding) if (cur->encoding)