mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-03-19 14:50:07 +03:00
Fix possible null dereference in xmlXPathIdFunction
If a certain memory allocation fails, xmlXPathIdFunction would dereference a null pointer. Closes #77.
This commit is contained in:
parent
b17e3d1c2b
commit
59028ba08c
1
xpath.c
Normal file → Executable file
1
xpath.c
Normal file → Executable file
@ -8626,6 +8626,7 @@ xmlXPathIdFunction(xmlXPathParserContextPtr ctxt, int nargs) {
|
||||
return;
|
||||
}
|
||||
obj = xmlXPathCacheConvertString(ctxt->context, obj);
|
||||
if (obj == NULL) return;
|
||||
ret = xmlXPathGetElementsByIds(ctxt->context->doc, obj->stringval);
|
||||
valuePush(ctxt, xmlXPathCacheWrapNodeSet(ctxt->context, ret));
|
||||
xmlXPathReleaseObject(ctxt->context, obj);
|
||||
|
Loading…
x
Reference in New Issue
Block a user