[
https://issues.apache.org/jira/browse/XALANC-733?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13460508#comment-13460508
]
Martin Elzen commented on XALANC-733:
-------------------------------------
Hi Steven,
thanks for looking into this! I like your proposed solution much more than the
patch I was proposing. However, taking the address-of NULL... Sounds *really*
likely to be undefined behavior... Maybe it would be better to either:
a) do = "" // ie assign as default an empty string in the relevant XalanLocator
constructor?
b) define a static inline fn as part of the XalanLocator class that would
return an empty string,
something like:
inline static const XalanDOMChar* emptyString()
{
return "";
}
and then in the relevant XalanLocator constructor do:
= emptyString()
> 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.patch
>
>
> 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: [email protected]
For additional commands, e-mail: [email protected]