Details
-
Bug
-
Resolution: Out of scope
-
P2: Important
-
4.6.3
-
None
Description
QDomDocument::importNode() is unable to import null nodes. Instead of simply returning a null node, it crashes with a segmentation fault. A typical code situation where this occurs is:
QDomDocument doc1;
doc1.setContent(QByteArray("<test/>"), true);
QDomNode nullNode = doc1.elementsByTagName("doesnotexist").item(0);
QDomDocument doc2;
doc2.appendChild(doc2.importNode(nullNode, true));
Minimal code snippet to reproduce the bug:
QDomDocument doc;
doc.importNode(QDomNode(), false);
Attachments
For Gerrit Dashboard: QTBUG-12927 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
94821,8 | Fix QDomDocument::importNode() crashing on null nodes | dev | qt/qtbase | Status: MERGED | +2 | 0 |
96550,2 | Fix QDomDocument::importNode() crashing on null nodes | 5.3 | qt/qtbase | Status: ABANDONED | -2 | 0 |