You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Jon Iles <jo...@packwood-cottages.freeserve.co.uk> on 2000/09/22 10:34:11 UTC
Possible XercesDOMPrintWriter.cpp bug?
Hi,
the following code appears in XercesDOMPrintWriter.cpp
void
XercesDOMPrintWriter::write(
const XMLCh* s,
unsigned int theOffset,
unsigned int theLength)
{
assert(s != 0);
assert(length(s) == 0 || theOffset < length(s));
...
I've encountered a situation where the s buffer is populated, but not NUL
terminated. The parameters theOffset and theLength are correct, but the call
to length(s) in the assert causes a crash due, it seems, to the lack of NUL
termination. Removing the offending assert gets around the issue.
Cheers,
Jon