1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-03-19 14:50:07 +03:00

Fix undefined behavior in xmlXPathTryStreamCompile

&NULL[0] is undefined behavior.
This commit is contained in:
Nick Wellnhofer 2020-06-10 13:23:43 +02:00
parent e98150d444
commit 487871b0e3

View File

@ -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);
}