28 lines
642 B
Diff
28 lines
642 B
Diff
--- libxslt/pattern.c
|
|
+++ libxslt/pattern.c
|
|
@@ -2076,6 +2076,8 @@
|
|
priority = cur->priority;
|
|
pat = xsltCompilePatternInternal(cur->match, style->doc, cur->elem,
|
|
style, NULL, 1);
|
|
+ if (pat == NULL)
|
|
+ return(-1);
|
|
while (pat) {
|
|
next = pat->next;
|
|
pat->next = NULL;
|
|
--- libxslt/xsltutils.c
|
|
+++ libxslt/xsltutils.c
|
|
@@ -2102,9 +2102,13 @@
|
|
#else
|
|
xpathCtxt = xmlXPathNewContext(style->doc);
|
|
#endif
|
|
+ if (xpathCtxt == NULL)
|
|
+ return NULL;
|
|
xpathCtxt->dict = style->dict;
|
|
} else {
|
|
xpathCtxt = xmlXPathNewContext(NULL);
|
|
+ if (xpathCtxt == NULL)
|
|
+ return NULL;
|
|
}
|
|
/*
|
|
* Compile the expression.
|