diff options
author | João Abecasis <joao@abecasis.name> | 2009-10-07 14:48:50 +0200 |
---|---|---|
committer | João Abecasis <joao@abecasis.name> | 2009-10-21 13:45:46 +0200 |
commit | 0689a85ca20a36808b388efc452892606d47b34d (patch) | |
tree | 23069045048c03655d7478a02d82d80368f1910b /src/corelib/io/qfsfileengine_p.h | |
parent | 2a293f91a6b550cd72851d08616b4a8199faabdd (diff) |
Fix 32/64-bit issues with QFile::map/unmap() on *nix systems
We would previously silently ignore overflows in 32-bit systems and not
properly support 64-bit offsets in systems that support it because of
integer overflow.
There was also a problem that could prevent unmap from succeeding,
because we were passing the wrong length argument.
Task-number: QT-1594
Reviewed-by: Thiago Macieira
Diffstat (limited to 'src/corelib/io/qfsfileengine_p.h')
-rw-r--r-- | src/corelib/io/qfsfileengine_p.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/io/qfsfileengine_p.h b/src/corelib/io/qfsfileengine_p.h index 66e0219889..ee127c1313 100644 --- a/src/corelib/io/qfsfileengine_p.h +++ b/src/corelib/io/qfsfileengine_p.h @@ -114,7 +114,7 @@ public: mutable int cachedFd; mutable DWORD fileAttrib; #else - QHash<uchar *, QPair<int /*offset*/, int /*handle|len*/> > maps; + QHash<uchar *, QPair<int /*offset % PageSize*/, size_t /*length + offset % PageSize*/> > maps; mutable QT_STATBUF st; #endif int fd; |