You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by xe...@xml.apache.org on 2004/09/14 22:12:37 UTC

[jira] Resolved: (XERCESC-1248) AttrNS/ElementNS setPrefix(empyString)

Message:

   The following issue has been resolved as FIXED.

   Resolver: Alberto Massari
       Date: Tue, 14 Sep 2004 1:12 PM

A fix is in CVS; please verify.

Alberto
---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/XERCESC-1248

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: XERCESC-1248
    Summary: AttrNS/ElementNS setPrefix(empyString)
       Type: Bug

     Status: Resolved
   Priority: Major
 Resolution: FIXED

    Project: Xerces-C++
 Components: 
             DOM
   Versions:
             2.5.0

   Assignee: 
   Reporter: Tobias Schuette

    Created: Fri, 6 Aug 2004 12:50 AM
    Updated: Tue, 14 Sep 2004 1:12 PM

Description:
passing an emptyString "" (_not_ a null pointer) to the DOMAttrNSImpl::setPrefix(prefix) throws an INVALID_CHARACTER_ERR in isXMLName(prefix) before the code is executed that handles the special case for null pointer and emptystring.

the isXMLName(prefix) check should be performed after the special case handling to verify that the prefix isn't empty:

DOMAttrNSImpl.cpp around line 130:

    if (prefix == 0 || prefix[0] == chNull) {
        fName = fLocalName;
        fPrefix = 0;
        return;
    }

    if (!((DOMDocumentImpl *)this->getOwnerDocument())->isXMLName(prefix))
        throw DOMException(DOMException::INVALID_CHARACTER_ERR,0, GetDOMNodeMemoryManager);


same problem appears in DOMElementNSImpl::setPrefix(prefix)




---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org