diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2006-06-08 17:00:08 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2006-06-08 17:00:08 +0000 |
commit | 393830a33a02d2f7163fcd4b27b7e5d6a46d8bac (patch) | |
tree | 09b1e2f18fac59a2d38bd0370de2c08a6b4d18ff /lib/System | |
parent | 28962f353b16f34571b3ed3127f7e17e1c0a76f2 (diff) | |
download | llvm-393830a33a02d2f7163fcd4b27b7e5d6a46d8bac.tar.gz llvm-393830a33a02d2f7163fcd4b27b7e5d6a46d8bac.tar.bz2 llvm-393830a33a02d2f7163fcd4b27b7e5d6a46d8bac.tar.xz |
For PR804:
Change the file size field of StatusInfo to be uint64_t instead of size_t
so that we know it is always 64 bits. This prevents some overflow on
systems where size_t is 32 bits when it ought to be 64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28726 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/System')
-rw-r--r-- | lib/System/Win32/Path.inc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/System/Win32/Path.inc b/lib/System/Win32/Path.inc index f7be77f8c9..4aab276548 100644 --- a/lib/System/Win32/Path.inc +++ b/lib/System/Win32/Path.inc @@ -340,7 +340,7 @@ Path::getStatusInfo(StatusInfo& info) const { ThrowError("getStatusInfo():" + std::string(path) + ": Can't get status: "); info.fileSize = fi.nFileSizeHigh; - info.fileSize <<= 32; + info.fileSize <<= sizeof(fi.nFileSizeHigh)*8; info.fileSize += fi.nFileSizeLow; info.mode = fi.dwFileAttributes & FILE_ATTRIBUTE_READONLY ? 0555 : 0777; |