[Webkit-unassigned] [Bug 73404] [WebSocket] bufferedAmount calculation is wrong in CLOSING and CLOSED state
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Nov 30 01:47:50 PST 2011
https://bugs.webkit.org/show_bug.cgi?id=73404
--- Comment #3 from Kent Tamura <tkent at chromium.org> 2011-11-30 01:47:50 PST ---
(From update of attachment 117138)
View in context: https://bugs.webkit.org/attachment.cgi?id=117138&action=review
> Source/WebCore/websockets/WebSocket.cpp:571
> + unsigned long c = a + b;
> + if (c < a || c < b)
> + return std::numeric_limits<unsigned long>::max();
I think this code is correct according to the C99 standard, but I guess some people might be afraid that this code is not correct on some platforms.
I recommend changing this to
if (numeric_limits<unsigned long>::max() - a < b) ...
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list