[ https://issues.apache.org/jira/browse/XALANC-733?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13464808#comment-13464808 ]
Martin Elzen commented on XALANC-733: ------------------------------------- the following patch against XalanLocator.hpp *as in rev 1389910* compiles on AIX, and after using it the samples/SimpleTransform executable seems to work okay : --- XalanLocator.hpp.orig 2012-09-27 17:08:30.936963206 +0200 +++ XalanLocator.hpp 2012-09-27 17:08:39.515962213 +0200 @@ -67,7 +67,7 @@ static const XalanDOMChar* getPublicId( const Locator* theLocator, - const XalanDOMChar* theAlternateId = &s_dczero) + const XalanDOMChar* theAlternateId = &( nullChar() ) ) { return theLocator == 0 ? theAlternateId : (theLocator->getPublicId() ? theLocator->getPublicId() : theAlternateId); @@ -76,7 +76,7 @@ static const XalanDOMChar* getSystemId( const Locator* theLocator, - const XalanDOMChar* theAlternateId = &s_dczero) + const XalanDOMChar* theAlternateId = &( nullChar() ) ) { return theLocator == 0 ? theAlternateId : (theLocator->getSystemId() ? theLocator->getPublicId() : theAlternateId); @@ -125,7 +125,13 @@ XalanLocator& operator=(const XalanLocator&); - const static XalanDOMChar s_dczero = 0; + inline + static + const XalanDOMChar& nullChar() + { + const static XalanDOMChar sm_dczero = 0; + return sm_dczero; + } }; > Ensure that XalanLocator::getSystemId() and getPublicId() do not return NULL > ---------------------------------------------------------------------------- > > Key: XALANC-733 > URL: https://issues.apache.org/jira/browse/XALANC-733 > Project: XalanC > Issue Type: Bug > Components: XalanC, XPathC > Affects Versions: 1.11 > Reporter: Steven J. Hathaway > Assignee: Steven J. Hathaway > Attachments: XalanLocator-3.patch, XalanLocator.patch, > XalanLocator.patch2 > > > The recommended patch to "xalanc/PlatformSupport/XalanLocator.hpp" > ensures that getSystemId() and getPublicId() do not return NULL pointers. > XalanC source files that can benefit from the patch include: > xalanc/PlatformSupport/ProblemListenerBase.cpp > xalanc/PlatformSupport/XSLException.cpp > xalanc/XPath/XPathExecutionContextDefault.cpp > The patch will be submitted shortly. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@xalan.apache.org For additional commands, e-mail: dev-h...@xalan.apache.org