qt6-bb10/tests/auto/corelib/xml/qxmlstream
Thiago Macieira 817800ad39 Fix QXmlStreamReader parsing of files containing NULs
Due to a flaw in the internal API, QXmlStreamReader's internal buffering
would mistake a NUL byte in the input stream for EOF during parsing, but
wouldn't set atEnd == true because it hadn't yet processed all bytes.
This resulted in an infinite loop in QXmlStreamReaderPrivate::parse.

So, instead of returning zero (false) to indicate EOF, return -1 (but in
unsigned form, ~0, to avoid ICC warnings of change of sign). In turn,
this required enlarging a few variables to avoid ~0U becoming 0xffff,
which is a valid QChar (could happen if the input is a QString, not a
QIODevice).

Task-number: QTBUG-43513
Change-Id: If5badcfd3e4176b79517da1fd108e0abb93a3fd1
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-01-24 18:35:22 +01:00
..
XML-Test-Suite Moving relevant tests to corelib/xml 2011-09-01 13:08:32 +02:00
data Fix QXmlStreamReader parsing of files containing NULs 2015-01-24 18:35:22 +01:00
.gitattributes Moving relevant tests to corelib/xml 2011-09-01 13:08:32 +02:00
.gitignore Moving relevant tests to corelib/xml 2011-09-01 13:08:32 +02:00
XML-Test-Suite-LICENSE.txt Moving relevant tests to corelib/xml 2011-09-01 13:08:32 +02:00
qc14n.h Update license headers and add new license files 2014-09-24 12:26:19 +02:00
qxmlstream.pro Set the Qt API level to compatibility mode in all tests. 2012-08-01 15:37:46 +02:00
setupSuite.sh Update license headers and add new license files 2014-09-24 12:26:19 +02:00
tst_qxmlstream.cpp Update license headers and add new license files 2014-09-24 12:26:19 +02:00