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:
parent
e98150d444
commit
487871b0e3
3
xpath.c
3
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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user