Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
4.6.2, 4.7.0
-
None
-
OpenBSD 4.7 with Qt 4.6.2
Description
When building Qt Creator 1.3.1 qdoc3 segfaults while processing the documentation. The segfault occurs when "delete tree" is called at the end of processQdocconfFile() in tools/qdoc3/main.cpp. In InnerNode::removeChild() in tools/qdoc3/node.cpp the iterator returned by childMap.find() isn't checked:
QMap<QString, Node *>::Iterator ent = childMap.find( child->name() );
if ( *ent == child )
I replaced the second line by:
if ( ent != childMap.end() && *ent == child )
Now qdoc3 doesn't segfault.
There are two more places in InnerNode::removeChild() where the iterator returned by QMap.find() isn't checked.