1
0
mirror of https://gitlab.xiph.org/xiph/icecast-server.git synced 2024-12-04 14:46:30 -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 fb3678b0ca
commit 5d603a01d8

View File

@ -311,9 +311,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)