summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2019-04-05 11:25:13 +0200
committerEdward Welbourne <edward.welbourne@qt.io>2019-04-09 09:12:11 +0000
commit6d4a456a28282973d2501e0b16f09cafb316bb0a (patch)
tree9f778d0ab9c2a1f7200c2dc70c7bc251b4832532 /src
parent9617791075e02f19675f60060cb5776eb0e09edd (diff)
Fix off-by-one error in QTranslatorPrivate::do_load()
The central loop starts by reading five bytes; but the loop condition only checked that four were available. Change-Id: I244cecacabeffbac10ad94081f32847f912d95d9 Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: hjk <hjk@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/kernel/qtranslator.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/kernel/qtranslator.cpp b/src/corelib/kernel/qtranslator.cpp
index 929554f6bc..63aeed07c3 100644
--- a/src/corelib/kernel/qtranslator.cpp
+++ b/src/corelib/kernel/qtranslator.cpp
@@ -824,7 +824,7 @@ bool QTranslatorPrivate::do_load(const uchar *data, int len, const QString &dire
data += MagicLength;
QStringList dependencies;
- while (data < end - 4) {
+ while (data < end - 5) {
quint8 tag = read8(data++);
quint32 blockLen = read32(data);
data += 4;