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 bu...@apache.org on 2002/04/09 17:39:21 UTC
DO NOT REPLY [Bug 7859] -
XMLString::transcode added garbage characters
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7859>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7859
XMLString::transcode added garbage characters
------- Additional Comments From David_N_Bertoni@lotus.com 2002-04-09 15:39 -------
The pointer that DOMString::rawBuffer() returns is not guaranteed to be null-
terminated, and XMLString::transcode() _requires_ that the array be null-
terminated. In particular, when the parser processes entities, the result text
node's value may _not_ be null-terminated.
Please run your code again and check to see whether or not the string is null-
terminated. If it is not, please mark this bug as invalid. It's your
responsibility to ensure that any string you pass to XMLString::transcode() is
null-terminated, even if that means you have to make a copy of it.
You should also remember that you must delete the memory returned by
XMLString::transcode():
delete [] dch;
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org