summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKati Kankaanpaa <kati.kankaanpaa@theqtcompany.com>2015-12-07 15:36:27 -0800
committerKati Kankaanpaa <kati.kankaanpaa@theqtcompany.com>2015-12-08 18:13:27 +0000
commitdd0feaa95a4c3e186c18bab16db5552bb8efc2db (patch)
treeed3fb7fd05a6cf86fca8ccc0a6bc3fbf7ea60cd8
parentac734d1bf343d64d6df93589ce1d8c9a2f7dbe9c (diff)
Fix infinite loop in MIME classinfo parser in ActiveQtv5.6.0-beta1
MIME extensions are parsed starting from the end by finding the last extension separator ':' and chopping off the end of the string. Now only 'extension - 1' chars are chopped which leaves the last extension separator in place causing an infinite loop where the same separator is found round after round. Fixed by chopping the extension separator also. Change-Id: I3df6008ad53dbecc17ac98647aedab63bf848963 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
-rw-r--r--src/activeqt/control/qaxserver.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/activeqt/control/qaxserver.cpp b/src/activeqt/control/qaxserver.cpp
index 2de749f..1703765 100644
--- a/src/activeqt/control/qaxserver.cpp
+++ b/src/activeqt/control/qaxserver.cpp
@@ -330,7 +330,7 @@ HRESULT UpdateRegistry(BOOL bRegister)
QString extension;
while (mime.contains(QLatin1Char(':'))) {
extension = mime.mid(mime.lastIndexOf(QLatin1Char(':')) + 1);
- mime.chop(extension.length() - 1);
+ mime.chop(extension.length() + 1);
// Prepend '.' before extension, if required.
extension = extension.trimmed();
if (!extension.startsWith(dot))