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>
bb10
Edward Welbourne 2019-04-05 11:25:13 +02:00
parent 9617791075
commit 6d4a456a28
1 changed files with 1 additions and 1 deletions

View File

@ -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;