[ http://nagoya.apache.org/jira/browse/XERCESC-398?page=history ]
Alberto Massari updated XERCESC-398:
------------------------------------
Priority: Major
> DOMString::appendData(const DOMString&) is broken
> -------------------------------------------------
>
> Key: XERCESC-398
> URL: http://nagoya.apache.org/jira/browse/XERCESC-398
> Project: Xerces-C++
> Type: Bug
> Components: DOM
> Versions: 1.6.0
> Environment: Operating System: Other
> Platform: All
> Reporter: Vladimir Dozen
> Assignee: Xerces-C Developers Mailing List
>
> DOMString::appendData does not add trailing zero to resulting string, which
> causes trash characters be written into attribute values (for example).
> Part of method code:
> ====================================
> //
> // This string now had enough buffer room to hold the data to
> // be appended. Go ahead and copy it in.
> XMLCh *srcP = other.fHandle->fDSData->fData;
> XMLCh *destP = &fHandle->fDSData->fData[fHandle->fLength];
> unsigned int i;
> for (i=0; i<other.fHandle->fLength; i++)
> destP[i] = srcP[i];
>
> // dozen: here is my fix for this bug
> destP[i] = 0;
> fHandle->fLength += other.fHandle->fLength;
> }
> ======================================
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://nagoya.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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]