Make sure that double fits into uint64_t
Signed-off-by: Miklos Vajna <vmiklos@collabora.com> Change-Id: Ic521383f71c1865ae18fc880b79493c52285e29bpull/2457/head
parent
9587f4c816
commit
bc0401fc49
Binary file not shown.
|
@ -448,7 +448,7 @@ bool ClientSession::_handleInput(const char *buffer, int length)
|
|||
str = perfcounter.data();
|
||||
endptr = nullptr;
|
||||
double counter = strtod(str, &endptr);
|
||||
if (*endptr == '\0')
|
||||
if (*endptr == '\0' && (counter < (double)(std::numeric_limits<uint64_t>::max() / 1000)))
|
||||
{
|
||||
// Now we know how to translate from the client's performance.now() values to
|
||||
// microseconds since the epoch.
|
||||
|
|
Loading…
Reference in New Issue