git/compat/poll
Steve Hoelzer e8dfcace31 poll: use GetTickCount64() to avoid wrap-around issues
The value of timeout starts as an int value, and for this reason it
cannot overflow unsigned long long aka ULONGLONG. The unsigned version
of this initial value is available in orig_timeout. The difference
(orig_timeout - elapsed) cannot wrap around because it is protected by
a conditional (as can be seen in the patch text). Hence, the ULONGLONG
difference can only have values that are smaller than the initial
timeout value and truncation to int cannot overflow.

Signed-off-by: Steve Hoelzer <shoelzer@gmail.com>
[j6t: improved both implementation and log message]
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-11-05 13:02:42 +09:00
..
poll.c poll: use GetTickCount64() to avoid wrap-around issues 2018-11-05 13:02:42 +09:00
poll.h compat/poll: prepare for targeting Windows Vista 2018-10-04 05:39:56 -07:00