diff options
Diffstat (limited to 'include/libxml/xpathInternals.h')
-rw-r--r-- | include/libxml/xpathInternals.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/libxml/xpathInternals.h b/include/libxml/xpathInternals.h index dcd52434..a1944ae1 100644 --- a/include/libxml/xpathInternals.h +++ b/include/libxml/xpathInternals.h @@ -296,7 +296,9 @@ XMLPUBFUN void * XMLCALL #define CHECK_ARITY(x) \ if (ctxt == NULL) return; \ if (nargs != (x)) \ - XP_ERROR(XPATH_INVALID_ARITY); + XP_ERROR(XPATH_INVALID_ARITY); \ + if (ctxt->valueNr < ctxt->valueFrame + (x)) \ + XP_ERROR(XPATH_STACK_ERROR); /** * CAST_TO_STRING: |