Details
-
Bug
-
Status: Closed
-
Critical
-
Resolution: Fixed
-
2.5.0
-
None
-
Windows Xp Sp1
Description
In makeContentModel method in complextypeinfo.cpp, the following code could crash Xerces:
aSpecNode = new (fMemoryManager) ContentSpecNode(*fContentSpec);
aSpecNode = convertContentSpecTree(aSpecNode, checkUPA);
retModel = buildContentModel(aSpecNode);
delete aSpecNode;
In the case when buildContentModel creates a MixedContentModel model, the statement "delete aSpecNode" freed fChildren in MixedContentModel. Later access to fChildren could crash Xerces.
We ran into some crashes due to this bug. One possible fix is to create a QName in the class MixedContentModel:
line 212
for (unsigned int index = 0; index < fCount; index++)
{ fChildren[index] = new QName(*children.elementAt(index)); fChildTypes[index] = childTypes.elementAt(index); }