mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-26 00:37:43 +03:00
malloc-fail: Stop using XPath stack frames
There's too much code which assumes that if ctxt->value is non-null, a value can be successfully popped off the stack. This assumption can break with stack frames when malloc fails. Instead of trying to fix all call sites, remove the stack frame logic. It only offered very little protection against misbehaving extension functions. We already check the stack size after a function call which should be enough. Found by OSS-Fuzz.
This commit is contained in:
@@ -400,7 +400,7 @@ struct _xmlXPathParserContext {
|
||||
int xptr; /* it this an XPointer expression */
|
||||
xmlNodePtr ancestor; /* used for walking preceding axis */
|
||||
|
||||
int valueFrame; /* used to limit Pop on the stack */
|
||||
int valueFrame; /* unused */
|
||||
};
|
||||
|
||||
/************************************************************************
|
||||
|
||||
Reference in New Issue
Block a user