[libxslt] xslt: Return NULL stylesheet on attribute set errors



commit e300b66fb62bf6fea98c543d11d64fec2167ae30
Author: Nick Wellnhofer <wellnhofer aevum de>
Date:   Wed Sep 7 17:25:18 2022 +0200

    xslt: Return NULL stylesheet on attribute set errors

 libxslt/xslt.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/libxslt/xslt.c b/libxslt/xslt.c
index 468e97ec..1c59ecd1 100644
--- a/libxslt/xslt.c
+++ b/libxslt/xslt.c
@@ -6681,6 +6681,9 @@ xsltParseStylesheetUser(xsltStylesheetPtr style, xmlDocPtr doc) {
     }
 #endif /* else of XSLT_REFACTORED */
 
+    if (style->parent == NULL)
+        xsltResolveStylesheetAttributeSet(style);
+
     if (style->errors != 0) {
         /*
         * Detach the doc from the stylesheet; otherwise the doc
@@ -6695,9 +6698,6 @@ xsltParseStylesheetUser(xsltStylesheetPtr style, xmlDocPtr doc) {
         return(-1);
     }
 
-    if (style->parent == NULL)
-        xsltResolveStylesheetAttributeSet(style);
-
     return(0);
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]