diff -r 79de32ba3296 -r 89e065397ea6 tests/auto/qxmlstream/tst_qxmlstream.cpp --- a/tests/auto/qxmlstream/tst_qxmlstream.cpp Fri May 14 16:40:13 2010 +0300 +++ b/tests/auto/qxmlstream/tst_qxmlstream.cpp Thu May 27 13:40:48 2010 +0300 @@ -569,6 +569,7 @@ 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 @@ QCOMPARE(output, expectedOutput); } +void tst_QXmlStream::qtbug9196_crash() const +{ + // the following input used to produce a crash in the stream reader + QByteArray ba("" + ""); + QXmlStreamReader xml(ba); + while (!xml.atEnd()) { + xml.readNext(); + } +} + #include "tst_qxmlstream.moc" // vim: et:ts=4:sw=4:sts=4