diff options
author | Olivier Goffart <ogoffart@trolltech.com> | 2009-11-24 08:34:48 (GMT) |
---|---|---|
committer | Jason McDonald <jason.mcdonald@nokia.com> | 2009-11-25 01:50:19 (GMT) |
commit | 4e5173e37ac2ea60d53ac59b7a6838c8e286d67e (patch) | |
tree | 921464fbdb58a6c839e9dd15f63eaf10d25e2084 | |
parent | cb9e4b54df4952fdf03c3ddc1cca57970b9f3787 (diff) | |
download | Qt-4e5173e37ac2ea60d53ac59b7a6838c8e286d67e.zip Qt-4e5173e37ac2ea60d53ac59b7a6838c8e286d67e.tar.gz Qt-4e5173e37ac2ea60d53ac59b7a6838c8e286d67e.tar.bz2 |
Fix QFile::map in Linux 64bit
On 64bit, qint64(size_t(-1)) = -1
Reviewed-by: Joao
Reviewed-by: Thiago
(cherry picked from commit 829d9e10ad3d26fb2fddef01c8e36352018c3fec)
(cherry picked from commit c71c46430317b70e784f0952d0aac048775ad842)
-rw-r--r-- | src/corelib/io/qfsfileengine_unix.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/io/qfsfileengine_unix.cpp b/src/corelib/io/qfsfileengine_unix.cpp index 17bc448..5fd7834 100644 --- a/src/corelib/io/qfsfileengine_unix.cpp +++ b/src/corelib/io/qfsfileengine_unix.cpp @@ -1245,7 +1245,7 @@ uchar *QFSFileEnginePrivate::map(qint64 offset, qint64 size, QFile::MemoryMapFla } if (offset < 0 || offset != qint64(QT_OFF_T(offset)) - || size < 0 || size > qint64(size_t(-1))) { + || size < 0 || quint64(size) > quint64(size_t(-1))) { q->setError(QFile::UnspecifiedError, qt_error_string(int(EINVAL))); return 0; } |