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:41:15 (GMT) |
commit | c71c46430317b70e784f0952d0aac048775ad842 (patch) | |
tree | ee8b93d1fe2b0227ec2493d22e05cd1c827c47af /src/corelib/io | |
parent | 80e9b7cdeeb1b1e85e724b4ed1903e0923005c79 (diff) | |
download | Qt-c71c46430317b70e784f0952d0aac048775ad842.zip Qt-c71c46430317b70e784f0952d0aac048775ad842.tar.gz Qt-c71c46430317b70e784f0952d0aac048775ad842.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)
Diffstat (limited to 'src/corelib/io')
-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; } |