Chris Cheung <[EMAIL PROTECTED]> writes: > On 20 Dec 2003, Jason E. Stewart wrote: > > > > The memory to malloc should be (length * UTF8_MAXLEN + 1): > > > > > > XMLByte* res = new XMLByte[length * UTF8_MAXLEN + 1]; // output > > > > > > so that the memory for the ending '\0' is not missed. > > > > Does changing this make a difference? I would be surprised - the call > > to transcode to gives the *maximum possible length* for the buffer, > > and returns the *actual* length used. Does changing this make valgrind > > happy? I've got no objection to adding this to the code, I'm just > > curious. > > Yes. After I changed the length, recompile and perform the same test, the > error message from valgrind disappear. Will this issue be fixed in the > next release?
Chris, I forgot to add, could you please add a bug report for this one? That way it won't get lost in the shuffle. You need for a seperate patch file or anything, you past your original email into the report: http://nagoya.apache.org/bugzilla/enter_bug.cgi?product=Xerces-P Cheers, jas. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
