From bb7bfb81c158268fb242292b7e0fbd2d3b933d09 Mon Sep 17 00:00:00 2001 From: "cevans@chromium.org" <cevans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> Date: Fri, 1 Jun 2012 16:47:04 +0000 Subject: [PATCH] Fix crash with unexpected DTD nodes in XSLT. BUG=127417 Review URL: https://chromiumcodereview.appspot.com/10441148 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@140041 0039d316-1c4b-4281-b951-d872f2087c98 --- diff --git a/libxslt/xsltutils.h b/libxslt/xsltutils.h index 3886be3..c986a9c 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.10