summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qfsfileengine_p.h
diff options
context:
space:
mode:
authorJoão Abecasis <joao@abecasis.name>2009-10-07 14:48:50 +0200
committerJoão Abecasis <joao@abecasis.name>2009-10-21 13:45:46 +0200
commit0689a85ca20a36808b388efc452892606d47b34d (patch)
tree23069045048c03655d7478a02d82d80368f1910b /src/corelib/io/qfsfileengine_p.h
parent2a293f91a6b550cd72851d08616b4a8199faabdd (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.h2
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;