Details
Description
the methods returns the original string rather than the substring if the substring and original string have the same hash code.
This leeds to corrupt xml files due to prefixes being replaced by the entire string:
Original version:
while (*pspe != 0)
{
if (XMLString::equals((*pspe)->fString, in))
return (*pspe)->fString;
...
Bugfix suggestion:
//RP 120416 we need to check for length of the returned <=n; else any hash matching string longer than n will be accepted — bad snafu!
if (XMLString::equalsN((*pspe)>fString, in, n) && XMLString::stringLen( (*pspe)>fString)<=n)
Example prefix + attribute name that will fail:
HDM:
HDM:OffsetBack
Attachments
Issue Links
- is duplicated by
-
XERCESC-2043 String pooling in DOMDocumentImpl is unsafe, particularly on 64-bit platforms
- Closed