summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qbytearray.cpp
diff options
context:
space:
mode:
authorOlivier Goffart <olivier.goffart@nokia.com>2010-11-10 16:40:17 (GMT)
committerOlivier Goffart <olivier.goffart@nokia.com>2010-11-10 16:40:53 (GMT)
commitd40088433a96746c1904b9a2fc2999b784fe8850 (patch)
tree703adfce9e1471ca12e4b50265b6d612c9b93f9f /src/corelib/tools/qbytearray.cpp
parent4b65920161b7e7f14b05b9f25c008ff1c1252d4e (diff)
downloadQt-d40088433a96746c1904b9a2fc2999b784fe8850.zip
Qt-d40088433a96746c1904b9a2fc2999b784fe8850.tar.gz
Qt-d40088433a96746c1904b9a2fc2999b784fe8850.tar.bz2
Amend commit 27fe0f93f961e78b71cd0b729a0e324b847ec023
It is a typo. Else, it overflows
Diffstat (limited to 'src/corelib/tools/qbytearray.cpp')
-rw-r--r--src/corelib/tools/qbytearray.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/tools/qbytearray.cpp b/src/corelib/tools/qbytearray.cpp
index 68789d9..f26d878 100644
--- a/src/corelib/tools/qbytearray.cpp
+++ b/src/corelib/tools/qbytearray.cpp
@@ -541,7 +541,7 @@ QByteArray qUncompress(const uchar* data, int nbytes)
forever {
ulong alloc = len;
- if (len >= (2 << 31) - sizeof(QByteArray::Data)) {
+ if (len >= (1 << 31) - sizeof(QByteArray::Data)) {
//QByteArray does not support that huge size anyway.
qWarning("qUncompress: Input data is corrupted");
return QByteArray();
@@ -561,7 +561,7 @@ QByteArray qUncompress(const uchar* data, int nbytes)
switch (res) {
case Z_OK:
if (len != alloc) {
- if (len >= (2 << 31) - sizeof(QByteArray::Data)) {
+ if (len >= (1 << 31) - sizeof(QByteArray::Data)) {
//QByteArray does not support that huge size anyway.
qWarning("qUncompress: Input data is corrupted");
return QByteArray();