diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-04-27 17:02:50 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-04-27 17:02:50 (GMT) |
commit | db2d0f1d5d6a3409e5e43d3fdd17ddbb8e1b553d (patch) | |
tree | 3327f1ddf2859df97b98265bd16472650e0e66a5 /tests/auto | |
parent | 01c26e837617d494ecb06a11fc7c9eb628e1b75b (diff) | |
parent | ab5c902908861a084f60bc1bceba8a98289ce723 (diff) | |
download | Qt-db2d0f1d5d6a3409e5e43d3fdd17ddbb8e1b553d.zip Qt-db2d0f1d5d6a3409e5e43d3fdd17ddbb8e1b553d.tar.gz Qt-db2d0f1d5d6a3409e5e43d3fdd17ddbb8e1b553d.tar.bz2 |
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1:
fix crash in QXmlStreamReader
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/qxmlstream/tst_qxmlstream.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/auto/qxmlstream/tst_qxmlstream.cpp b/tests/auto/qxmlstream/tst_qxmlstream.cpp index 27ae089..3c5358c 100644 --- a/tests/auto/qxmlstream/tst_qxmlstream.cpp +++ b/tests/auto/qxmlstream/tst_qxmlstream.cpp @@ -569,6 +569,7 @@ private slots: void clear() const; void checkCommentIndentation() const; void checkCommentIndentation_data() const; + void qtbug9196_crash() const; private: static QByteArray readFile(const QString &filename); @@ -1528,5 +1529,16 @@ void tst_QXmlStream::checkCommentIndentation() const // task 256468 QCOMPARE(output, expectedOutput); } +void tst_QXmlStream::qtbug9196_crash() const +{ + // the following input used to produce a crash in the stream reader + QByteArray ba("<a><a><a><a><a><a><a><a><a><a><a><a><a><a><a><a><a><a><a><a><a><a><a><a><a><a><a><a><a><a><a><a>" + "<a><a><a><a><a><a><a><a><a><a><a><a><a><a><a><a><a><a><a><a><a><a><a><a><a><a><a><a><a></a>"); + QXmlStreamReader xml(ba); + while (!xml.atEnd()) { + xml.readNext(); + } +} + #include "tst_qxmlstream.moc" // vim: et:ts=4:sw=4:sts=4 |