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=14265>. 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=14265 Access violation with Null systemId/publicId in DTDScanner Summary: Access violation with Null systemId/publicId in DTDScanner Product: Xerces-C++ Version: Nightly build (please specify the date) Platform: All OS/Version: Other Status: NEW Severity: Critical Priority: Other Component: Validating Parser (DTD) AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] This problem exists in nightly build 2002-10-25-win32 and released version 2.1. The 1.9 Revision of DTD\DTDScanner.cpp addresses a problem with systemId and publicId described as 'Fix: public id / system id in entity decl should be null if empty'. The code is shown below:- // Fill in the id fields of the decl with the info we got const XMLCh* publicId = bbPubId.getRawBuffer(); const XMLCh* systemId = bbSysId.getRawBuffer(); decl.setPublicId((*publicId) ? publicId : 0); decl.setSystemId((*systemId) ? systemId : 0); ----> decl.setBaseURI((*lastInfo.systemId) ? lastInfo.systemId : 0); The problem is that in my test case although bbPubId.getRawBuffer() and bbSysId.getRawBuffer() return a pointer to an empty string which allows the test '((*publicId) ? publicId : 0)' to be applied safely the lastInfo.systemId in the line indicated above with ----> contains a null pointer and hence the test for *lastInfo.systemId blows up with an access violation. The null pointer was obtained in ReaderMgr::getLastExtEntityInfo() where lastinfo.sustemId is assigned, 'lastInfo.SystemId = theReader->getSystemId()'. In my case theReader- >getSystemId() returned a null pointer. I am trying to isolate a simple test case for this problem but is should be clear from the example above that the tests above cannot be safe if there is the possibility of returning a null pointer. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
