diff options
author | Nick Wellnhofer <wellnhofer@aevum.de> | 2012-08-15 21:09:19 +0200 |
---|---|---|
committer | Daniel Veillard <veillard@redhat.com> | 2012-09-04 14:54:48 +0800 |
commit | aebfee35d1106035dddf897e0e81d72d110b5e63 (patch) | |
tree | 9f9f319d2e1be90a8851e5080bac3f916e62b72e /libexslt | |
parent | 14ee81b06c12743a88fbc1676f3d35a86a74e08e (diff) | |
download | libxslt-aebfee35d1106035dddf897e0e81d72d110b5e63.tar.gz libxslt-aebfee35d1106035dddf897e0e81d72d110b5e63.tar.bz2 libxslt-aebfee35d1106035dddf897e0e81d72d110b5e63.zip |
Exit after compilation of invalid func:result
Second part of bug #680920.
Diffstat (limited to 'libexslt')
-rw-r--r-- | libexslt/functions.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libexslt/functions.c b/libexslt/functions.c index e7bb2f14..159e93da 100644 --- a/libexslt/functions.c +++ b/libexslt/functions.c @@ -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)); |