1
0
mirror of https://gitlab.gnome.org/GNOME/libxslt synced 2025-08-08 21:42:07 +03:00

Exit after compilation of invalid func:result

Second part of bug #680920.
This commit is contained in:
Nick Wellnhofer
2012-08-15 21:09:19 +02:00
committed by Daniel Veillard
parent 14ee81b06c
commit aebfee35d1
5 changed files with 25 additions and 0 deletions

View File

@@ -562,6 +562,7 @@ exsltFuncResultComp (xsltStylesheetPtr style, xmlNodePtr inst,
xsltGenericError(xsltGenericErrorContext,
"exsltFuncResultElem: only xsl:fallback is "
"allowed to follow func:result\n");
style->errors++;
return (NULL);
}
/* it is an error for a func:result element to not be a descendant
@@ -578,6 +579,7 @@ exsltFuncResultComp (xsltStylesheetPtr style, xmlNodePtr inst,
xsltGenericError(xsltGenericErrorContext,
"func:result element not a descendant "
"of a func:function\n");
style->errors++;
return (NULL);
}
if ((test->ns != NULL) &&
@@ -589,6 +591,7 @@ exsltFuncResultComp (xsltStylesheetPtr style, xmlNodePtr inst,
xsltGenericError(xsltGenericErrorContext,
"func:result element not allowed within"
" another func:result element\n");
style->errors++;
return (NULL);
}
}
@@ -598,6 +601,7 @@ exsltFuncResultComp (xsltStylesheetPtr style, xmlNodePtr inst,
xsltGenericError(xsltGenericErrorContext,
"func:result element not allowed within"
" a variable binding element\n");
style->errors++;
return (NULL);
}
}
@@ -611,6 +615,7 @@ exsltFuncResultComp (xsltStylesheetPtr style, xmlNodePtr inst,
xsltPrintErrorContext(NULL, NULL, NULL);
xsltGenericError(xsltGenericErrorContext,
"exsltFuncResultComp : malloc failed\n");
style->errors++;
return (NULL);
}
memset(ret, 0, sizeof(exsltFuncResultPreComp));