Fix out-of-range shifting

offsetHi needs to be casted first before shifting.

Change-Id: I29c773dd13d5b16042629604015bbf5645fab861
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
bb10
Maurice Kalinowski 2014-04-04 11:51:16 +02:00 committed by The Qt Project
parent 9ee07d5544
commit 670ebed121
1 changed files with 2 additions and 2 deletions

View File

@ -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);