diff options
author | Don Sanders <don.sanders@nokia.com> | 2012-03-05 11:51:21 +0200 |
---|---|---|
committer | Don Sanders <don.sanders@nokia.com> | 2012-03-05 11:51:21 +0200 |
commit | 1110aba98de19e3f1cd223f49e8ab3ca3f4f6fb3 (patch) | |
tree | 694393d030cd94fce0258e9b35ad5a519aa7d7ba | |
parent | 589877fd5aa1681b06f6d3f2058a4b078d412c51 (diff) |
Possible fix for messageserver sometimes crashing in valgrind
libicu appears to reading past end of input buffer by 1 byte.
-rw-r--r-- | src/libraries/qmfclient/support/qcharsetdetector.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libraries/qmfclient/support/qcharsetdetector.cpp b/src/libraries/qmfclient/support/qcharsetdetector.cpp index 8ad14813..c53f55d9 100644 --- a/src/libraries/qmfclient/support/qcharsetdetector.cpp +++ b/src/libraries/qmfclient/support/qcharsetdetector.cpp @@ -278,7 +278,10 @@ void QCharsetDetector::setText(const QByteArray &ba) } else { // ba is empty, possibly null. d->_ba = ""; d->_baExtended = ""; - } + } + // Workaround for libicu bug, it seems to sometimes read past end of input buffer by one byte + // This was causing messageserver to abnormally terminate when running in valgrind + d->_baExtended.append(char(0)); ucsdet_setText(d->_uCharsetDetector, d->_baExtended.constData(), int32_t(-1), &(d->_status)); if(hasError()) |