summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-04-27 14:20:43 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-04-27 14:20:43 (GMT)
commitab5c902908861a084f60bc1bceba8a98289ce723 (patch)
tree8a7b5b62790707531fc05b109239314ad1bcb8cc /tests/auto
parentd9c096ac73f86e321060e379a0df449bed1df310 (diff)
parent0948393df9b9046db5c3c92a12698aee056d8483 (diff)
downloadQt-ab5c902908861a084f60bc1bceba8a98289ce723.zip
Qt-ab5c902908861a084f60bc1bceba8a98289ce723.tar.gz
Qt-ab5c902908861a084f60bc1bceba8a98289ce723.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.cpp12
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