Summary: | Build error in Source/WebCore/fileapi/Blob.cpp | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Tanay <tanay.c> | ||||
Component: | WebCore Misc. | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | RESOLVED DUPLICATE | ||||||
Severity: | Normal | CC: | andersca, ap | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Attachments: |
|
Description
Tanay
2014-05-15 04:27:37 PDT
Created attachment 231500 [details]
Patch
Comment on attachment 231500 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=231500&action=review > Source/WebCore/fileapi/Blob.cpp:127 > + m_size = (actualSize <= std::numeric_limits<unsigned long long>::max()) ? static_cast<long long>(actualSize) : 0; The proposed code is incorrect - an unsigned long long value is always less than or equal to std::numeric_limits<unsigned long long>::max(), so comparing these makes is meaningless. The purpose of this check is to ensure that casting to a signed long long won't change the value. I think that you need something like: m_size = (actualSize <= static_cast<unsigned long long>(std::numeric_limits<long long>::max())) ? static_cast<long long>(actualSize) : 0; Or there may be some other idiom that I'm not aware of. Possibly something in CheckedArithmetic.h? *** This bug has been marked as a duplicate of bug 132678 *** |