summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorMaurice Kalinowski <maurice.kalinowski@digia.com>2014-04-04 11:51:16 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-04-09 12:51:06 +0200
commit670ebed1214ed0dae9a52ab40c5b5065c7d02a35 (patch)
treed8c09712b7ff428577c32acb2e25e6c6f87acd2b /src/corelib
parent9ee07d5544f0194cb7dd58e4383d25a08226acde (diff)
Fix out-of-range shifting
offsetHi needs to be casted first before shifting. Change-Id: I29c773dd13d5b16042629604015bbf5645fab861 Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/io/qfsfileengine_win.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/io/qfsfileengine_win.cpp b/src/corelib/io/qfsfileengine_win.cpp
index afc8deb1a0..fb4107b95d 100644
--- a/src/corelib/io/qfsfileengine_win.cpp
+++ b/src/corelib/io/qfsfileengine_win.cpp
@@ -1034,8 +1034,8 @@ uchar *QFSFileEnginePrivate::map(qint64 offset, qint64 size,
LPVOID mapAddress = ::MapViewOfFile(mapHandle, access,
offsetHi, offsetLo, size + extra);
#else
- offset = (offsetHi << 32) + offsetLo;
- LPVOID mapAddress = ::MapViewOfFileFromApp(mapHandle, access, offset, size);
+ LPVOID mapAddress = ::MapViewOfFileFromApp(mapHandle, access,
+ (ULONG64(offsetHi) << 32) + offsetLo, size);
#endif
if (mapAddress) {
uchar *address = extra + static_cast<uchar*>(mapAddress);