From 54e2d7bea82b91be95df6e06e69c46039b39ca98 Mon Sep 17 00:00:00 2001 From: Daniel Veillard <veillard@redhat.com> Date: Tue, 7 Aug 2012 11:26:43 +0800 Subject: [PATCH] Fix a bug in selecting XSLT elements To: libvir-list@redhat.com For https://bugzilla.redhat.com/show_bug.cgi?id=835982 CVE-2012-2825 Signed-off-by: Daniel Veillard <veillard@redhat.com> --- libxslt/xsltutils.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libxslt/xsltutils.h b/libxslt/xsltutils.h index 058d143..4df2221 100644 --- a/libxslt/xsltutils.h +++ b/libxslt/xsltutils.h @@ -52,8 +52,8 @@ extern "C" { * Checks that the element pertains to XSLT namespace. */ #define IS_XSLT_ELEM(n) \ - (((n) != NULL) && ((n)->ns != NULL) && \ - (xmlStrEqual((n)->ns->href, XSLT_NAMESPACE))) + (((n) != NULL) && ((n)->type == XML_ELEMENT_NODE) && \ + ((n)->ns != NULL) && (xmlStrEqual((n)->ns->href, XSLT_NAMESPACE))) /** * IS_XSLT_NAME: -- 1.7.11.4