summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@redhat.com>2011-08-18 17:10:13 +0800
committerDaniel Veillard <veillard@redhat.com>2011-08-19 11:07:51 +0800
commitf5048b3e71fc30ad096970b8df6e7af073bae4cb (patch)
tree65da4d67bbb6880e4afd0e073465180f90a32004 /include
parent69f04562f75212bfcabecd190ea8b06ace28ece2 (diff)
downloadlibxml2-f5048b3e71fc30ad096970b8df6e7af073bae4cb.tar.gz
Hardening of XPath evaluation
Add a mechanism of frame for XPath evaluation when entering a function or a scoped evaluation, also fix a potential problem in predicate evaluation.
Diffstat (limited to 'include')
-rw-r--r--include/libxml/xpath.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/libxml/xpath.h b/include/libxml/xpath.h
index 1a9e30eb..ddd9dd82 100644
--- a/include/libxml/xpath.h
+++ b/include/libxml/xpath.h
@@ -68,7 +68,8 @@ typedef enum {
XPATH_UNDEF_PREFIX_ERROR,
XPATH_ENCODING_ERROR,
XPATH_INVALID_CHAR_ERROR,
- XPATH_INVALID_CTXT
+ XPATH_INVALID_CTXT,
+ XPATH_STACK_ERROR
} xmlXPathError;
/*
@@ -380,6 +381,8 @@ struct _xmlXPathParserContext {
xmlXPathCompExprPtr comp; /* the precompiled expression */
int xptr; /* it this an XPointer expression */
xmlNodePtr ancestor; /* used for walking preceding axis */
+
+ int valueFrame; /* used to limit Pop on the stack */
};
/************************************************************************