[libxml2] Disallow namespace nodes in XPointer points
- From: Nick Wellnhofer <nwellnhof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libxml2] Disallow namespace nodes in XPointer points
- Date: Wed, 12 Oct 2016 11:29:30 +0000 (UTC)
commit 3f8a91036d338e51c059d54397a42d645f019c65
Author: Nick Wellnhofer <wellnhofer aevum de>
Date: Tue Jun 28 15:55:09 2016 +0200
Disallow namespace nodes in XPointer points
xpointer.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/xpointer.c b/xpointer.c
index d74174a..a7b03fb 100644
--- a/xpointer.c
+++ b/xpointer.c
@@ -1833,8 +1833,8 @@ xmlXPtrStartPointFunction(xmlXPathParserContextPtr ctxt, int nargs) {
case XPATH_RANGE: {
xmlNodePtr node = tmp->user;
if (node != NULL) {
- if (node->type == XML_ATTRIBUTE_NODE) {
- /* TODO: Namespace Nodes ??? */
+ if ((node->type == XML_ATTRIBUTE_NODE) ||
+ (node->type == XML_NAMESPACE_DECL)) {
xmlXPathFreeObject(obj);
xmlXPtrFreeLocationSet(newset);
XP_ERROR(XPTR_SYNTAX_ERROR);
@@ -1929,8 +1929,8 @@ xmlXPtrEndPointFunction(xmlXPathParserContextPtr ctxt, int nargs) {
case XPATH_RANGE: {
xmlNodePtr node = tmp->user2;
if (node != NULL) {
- if (node->type == XML_ATTRIBUTE_NODE) {
- /* TODO: Namespace Nodes ??? */
+ if ((node->type == XML_ATTRIBUTE_NODE) ||
+ (node->type == XML_NAMESPACE_DECL)) {
xmlXPathFreeObject(obj);
xmlXPtrFreeLocationSet(newset);
XP_ERROR(XPTR_SYNTAX_ERROR);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]