You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by tn...@apache.org on 2002/09/16 22:45:08 UTC
cvs commit: xml-xerces/c/src/xercesc/dom/impl DOMAttrNSImpl.cpp
tng 2002/09/16 13:45:08
Modified: c/src/xercesc/dom/impl DOMAttrNSImpl.cpp
Log:
DOM Fix: we should check if the prefix or localName are valid XMLName when setting name of AttrNSImpl
Revision Changes Path
1.7 +5 -1 xml-xerces/c/src/xercesc/dom/impl/DOMAttrNSImpl.cpp
Index: DOMAttrNSImpl.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/xercesc/dom/impl/DOMAttrNSImpl.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- DOMAttrNSImpl.cpp 16 Aug 2002 13:39:27 -0000 1.6
+++ DOMAttrNSImpl.cpp 16 Sep 2002 20:45:08 -0000 1.7
@@ -237,6 +237,10 @@
if (index >= 3999)
delete[] newName;
+
+ // Before we carry on, we should check if the prefix or localName are valid XMLName
+ if (!DOMDocumentImpl::isXMLName(fPrefix) || !DOMDocumentImpl::isXMLName(fLocalName))
+ throw DOMException(DOMException::NAMESPACE_ERR, 0);
}
// DOM Level 3: namespace URI is never empty string.
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org