Changeset 172725 in webkit
- Timestamp:
- Aug 18, 2014 2:14:35 PM (10 years ago)
- Location:
- trunk/Source
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r172723 r172725 1 2014-08-18 Przemyslaw Kuczynski <p.kuczynski@samsung.com> 2 3 Fix unintentional integer overflow before widen 4 https://bugs.webkit.org/show_bug.cgi?id=135463 5 6 Reviewed by Oliver Hunt. 7 8 Overflowing expression is evaluated using operands arithmetic but then is used in 9 context which expects an wider integer type. To avoid overflow at least one operand 10 has to be representative of the wider type. 11 12 * loader/FTPDirectoryParser.cpp: 13 (WebCore::parseOneFTPLine): Changed strtoul to strtoull. 14 * loader/ProgressTracker.cpp: 15 (WebCore::ProgressTracker::incrementProgress): Added static_cast to long long. 16 * platform/efl/FileSystemEfl.cpp: 17 (WebCore::getVolumeFreeSizeForPath): Added static_cast to uint64_t. 18 1 19 2014-08-18 Vivek Galatage <vivek.vg@samsung.com> 2 20 -
trunk/Source/WebCore/loader/FTPDirectoryParser.cpp
r160671 r172725 506 506 * than not showing the size at all. 507 507 */ 508 uint64_t size = strtoul (tokens[1], NULL, 10) * 512;508 uint64_t size = strtoull(tokens[1], 0, 10) * 512; 509 509 result.fileSize = String::number(size); 510 510 } -
trunk/Source/WebCore/loader/ProgressTracker.cpp
r170464 r172725 235 235 236 236 int numPendingOrLoadingRequests = frame->loader().numPendingOrLoadingRequests(true); 237 estimatedBytesForPendingRequests = progressItemDefaultEstimatedLength* numPendingOrLoadingRequests;237 estimatedBytesForPendingRequests = static_cast<long long>(progressItemDefaultEstimatedLength) * numPendingOrLoadingRequests; 238 238 remainingBytes = ((m_totalPageAndResourceBytesToLoad + estimatedBytesForPendingRequests) - m_totalBytesReceived); 239 239 if (remainingBytes > 0) // Prevent divide by 0. -
trunk/Source/WebCore/platform/efl/FileSystemEfl.cpp
r165676 r172725 106 106 return 0; 107 107 108 return buf.f_bavail* buf.f_bsize;108 return static_cast<uint64_t>(buf.f_bavail) * buf.f_bsize; 109 109 } 110 110 -
trunk/Source/WebKit2/ChangeLog
r172724 r172725 1 2014-08-18 Przemyslaw Kuczynski <p.kuczynski@samsung.com> 2 3 Fix unintentional integer overflow before widen 4 https://bugs.webkit.org/show_bug.cgi?id=135463 5 6 Reviewed by Oliver Hunt. 7 8 Overflowing expression is evaluated using operands arithmetic but then is used in 9 context which expects an wider integer type. To avoid overflow at least one operand 10 has to be representative of the wider type. 11 12 * WebProcess/soup/WebProcessSoup.cpp: 13 (WebKit::getMemorySize): Added long long literal. 14 1 15 2014-08-18 Przemyslaw Kuczynski <p.kuczynski@samsung.com> 2 16 -
trunk/Source/WebKit2/WebProcess/soup/WebProcessSoup.cpp
r169550 r172725 75 75 return kDefaultMemorySize; 76 76 77 return ((pageSize / 1024 ) * physPages) / 1024;77 return ((pageSize / 1024LL) * physPages) / 1024LL; 78 78 #else 79 79 // Fallback to default for other platforms.
Note: See TracChangeset
for help on using the changeset viewer.