[ http://nagoya.apache.org/jira/browse/XERCESC-398?page=history ] Alberto Massari resolved XERCESC-398: -------------------------------------
Assign To: (was: Xerces-C Developers Mailing List) Resolution: Fixed I have changed appendData() to always make room for the NULL terminator, and rawBuffer() to always add the terminator. Can you check if the sources under CVS fix your problem? Thanks, Alberto > 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 > > 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]