diff options
author | Olivier Goffart <ogoffart@trolltech.com> | 2009-11-24 08:34:48 (GMT) |
---|---|---|
committer | Olivier Goffart <ogoffart@trolltech.com> | 2009-11-24 09:42:04 (GMT) |
commit | 829d9e10ad3d26fb2fddef01c8e36352018c3fec (patch) | |
tree | d7c301d7840e31b84ec7987880fc31d28852c83f /src | |
parent | 6d2b684a84ae30c34728f4f0ae63dbeea4e1514c (diff) | |
download | Qt-829d9e10ad3d26fb2fddef01c8e36352018c3fec.zip Qt-829d9e10ad3d26fb2fddef01c8e36352018c3fec.tar.gz Qt-829d9e10ad3d26fb2fddef01c8e36352018c3fec.tar.bz2 |
Fix QFile::map in Linux 64bit
On 64bit, qint64(size_t(-1)) = -1
Reviewed-by: Joao
Reviewed-by: Thiago
Diffstat (limited to 'src')
-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 35737b3..8cbf6a3 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; } |