diff options
author | Kai Koehne <kai.koehne@nokia.com> | 2012-08-22 13:51:45 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-08-23 11:20:37 +0200 |
commit | e177a35dfe62dfebdd1381f30dc5f5b83b1d6b74 (patch) | |
tree | 8954355c48244376a9d846db88e3bf20122fc2ed /src/corelib/codecs/qicucodec.cpp | |
parent | e9bc07c4f24e8580a688c41b91a63e12851bb5ce (diff) |
ICU: Fix crash in codecForMib(2107)
availableMibs() unconditionally adds 2107 to the list of mibs. The patch
ensures that codecForMib() also knows about this special TSCII codec.
(Note that the autotest only really checks this code path if only this
test case is run. The other tests already fill the internal codec cache
otherwise).
Change-Id: Id987d7cecd5f5700cca75e9b85b37011f8e5c622
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'src/corelib/codecs/qicucodec.cpp')
-rw-r--r-- | src/corelib/codecs/qicucodec.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/corelib/codecs/qicucodec.cpp b/src/corelib/codecs/qicucodec.cpp index b591a3d50d..e348e68753 100644 --- a/src/corelib/codecs/qicucodec.cpp +++ b/src/corelib/codecs/qicucodec.cpp @@ -530,6 +530,10 @@ QTextCodec *QIcuCodec::codecForMibUnlocked(int mib) if (mibToName[i].mib == mib) return codecForNameUnlocked(mibToNameTable + mibToName[i].index); } + + if (mib == 2107) + return codecForNameUnlocked("TSCII"); + return 0; } |