[Webkit-unassigned] [Bug 136981] ArgumentEncoder::encode does not support long long

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Sep 22 09:27:43 PDT 2014


https://bugs.webkit.org/show_bug.cgi?id=136981





--- Comment #10 from Alexey Proskuryakov <ap at webkit.org>  2014-09-22 09:27:42 PST ---
(From update of attachment 238475)
View in context: https://bugs.webkit.org/attachment.cgi?id=238475&action=review

> Source/WebKit2/Platform/IPC/ArgumentCoders.h:110
> +        encoder << static_cast<int64_t>(duration.count());

What guarantees that int64_t is big enough for Rep? Or that Rep is not a double?

I think that we need either a more specific coder, or a compile time assertion.

> Source/WebKit2/Platform/IPC/ArgumentCoders.h:118
> -        result = std::chrono::duration<Rep, Period>(count);
> +        result = std::chrono::duration<Rep, Period>(static_cast<Rep>(count));

Shouldn't we verify that it doesn't overflow Rep? Data sent over IPC is untrusted.

-- 
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