[libxml2] Fix undefined behavior in xmlXPathTryStreamCompile



commit 487871b0e39bcc69ec0c1f69c30e2697712c6829
Author: Nick Wellnhofer <wellnhofer aevum de>
Date:   Wed Jun 10 13:23:43 2020 +0200

    Fix undefined behavior in xmlXPathTryStreamCompile
    
    &NULL[0] is undefined behavior.

 xpath.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/xpath.c b/xpath.c
index 1510d69c..74848cda 100644
--- a/xpath.c
+++ b/xpath.c
@@ -14104,8 +14104,7 @@ xmlXPathTryStreamCompile(xmlXPathContextPtr ctxt, const xmlChar *str) {
            }
        }
 
-       stream = xmlPatterncompile(str, dict, XML_PATTERN_XPATH,
-                       &namespaces[0]);
+       stream = xmlPatterncompile(str, dict, XML_PATTERN_XPATH, namespaces);
        if (namespaces != NULL) {
            xmlFree((xmlChar **)namespaces);
        }


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