qt5base-lts/tests/auto/corelib/codecs/qtextcodec
Thiago Macieira b23e72a772 Fix stateful handling of invalid UTF-8 straddling buffer borders
When a UTF-8 sequences is too short, QUtf8Functions::fromUtf8 returns
EndOfString. If the decoder is stateful, we must save the state and then
restart it when more data is supplied.

The new stateful decoder (8dd47e34b9)
mishandled the Error case by advancing the src pointer by a negative
number, thus causing a buffer overflow (the issue of the task).

And it also did not handle the len == 0 case properly, though neither
did the older decoder.

Task-number: QTBUG-38939
Change-Id: Ie03d7c55a04e51ee838ccdb3a01e5b989d8e67aa
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-05-13 12:37:19 +02:00
..
echo Replace use of putenv in test case 2013-11-04 11:16:16 +01:00
test don't test Qt::codecForHtml() - build with -no-gui 2013-10-16 17:10:15 +02:00
.gitattributes Moving relevant tests to corelib/codecs 2011-08-26 08:49:59 +02:00
.gitignore Moving relevant tests to corelib/codecs 2011-08-26 08:49:59 +02:00
korean.txt Moving relevant tests to corelib/codecs 2011-08-26 08:49:59 +02:00
QT4-crashtest.txt Moving relevant tests to corelib/codecs 2011-08-26 08:49:59 +02:00
qtextcodec.pro Remove Symbian-specific code from tests. 2011-09-29 06:41:42 +02:00
tst_qtextcodec.cpp Fix stateful handling of invalid UTF-8 straddling buffer borders 2014-05-13 12:37:19 +02:00
utf8.txt Moving relevant tests to corelib/codecs 2011-08-26 08:49:59 +02:00