From 2c51552143d8583315433baec946ef8739a528e9 Mon Sep 17 00:00:00 2001 From: "peterv%propagandism.org" Date: Thu, 16 Jun 2005 11:59:28 +0000 Subject: [PATCH] Fix for bug 289169 (DOMParser freezes when parsing elements with fixed attributes.). r/sr=jst, a=asa. git-svn-id: svn://10.0.0.236/trunk@174699 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/parser/expat/lib/xmlparse.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/mozilla/parser/expat/lib/xmlparse.c b/mozilla/parser/expat/lib/xmlparse.c index 25bdc390193..599861c4ecf 100644 --- a/mozilla/parser/expat/lib/xmlparse.c +++ b/mozilla/parser/expat/lib/xmlparse.c @@ -2843,11 +2843,14 @@ storeAtts(XML_Parser parser, const ENCODING *enc, /* BEGIN MOZILLA CHANGE (Include xmlns attributes in attributes array) */ #if 0 if (!--nPrefixes) + break; #else - if (!--nPrefixes && !nXMLNSDeclarations) + if (!--nPrefixes && !nXMLNSDeclarations) { + i += 2; + break; + } #endif /* END MOZILLA CHANGE */ - break; } /* BEGIN MOZILLA CHANGE (Include xmlns attributes in attributes array) */ else if (s[-1] == 3) { /* xmlns attribute */ @@ -2891,8 +2894,10 @@ storeAtts(XML_Parser parser, const ENCODING *enc, poolFinish(&tempPool); appAtts[i] = s; - if (!--nXMLNSDeclarations && !nPrefixes) + if (!--nXMLNSDeclarations && !nPrefixes) { + i += 2; break; + } } /* END MOZILLA CHANGE */ else /* not prefixed */