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=16151>. 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=16151 Memory leak in DTDScanner with ill-formed DTD declaration Summary: Memory leak in DTDScanner with ill-formed DTD declaration Product: Xerces-C++ Version: 2.1.0 Platform: All OS/Version: Other Status: NEW Severity: Critical Priority: Other Component: Validating Parser (DTD) AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] If there's a well-formedness error in a DTD declaration, DTDScanner will XMLScanner::emitError() or XMLValidator::emitError() before cleaning up. This causes a memory leak. I've attached partial patch for this. Unfortunately, it looks like there are times when XMLValidator::emitError() might not throw an exception, so that will require more work. Probably the whole function needs to protect the new instance with a Janitor and release the Janitor only when the new declaration is added to the grammar. cvs -z9 diff DTDScanner.cpp (in directory V:\xml- xerces\c\src\xercesc\validators\DTD\) Index: DTDScanner.cpp =================================================================== RCS file: /home/cvspublic/xml- xerces/c/src/xercesc/validators/DTD/DTDScanner.cpp,v retrieving revision 1.20 diff -r1.20 DTDScanner.cpp 3306d3305 < fScanner->emitError(XMLErrs::UnterminatedContentModel); 3307a3307 > fScanner->emitError(XMLErrs::UnterminatedContentModel); 3347d3346 < fScanner->emitError(XMLErrs::ExpectedElementName); 3348a3348 > fScanner->emitError(XMLErrs::ExpectedElementName); --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
