diff --git a/ChangeLog b/ChangeLog index e3b9c29f..8abaf589 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Fri Mar 10 16:37:12 CET 2017 + Fix hypothetical integer overflow for very, very large + timeout values. -CG + Fri Mar 10 16:22:54 CET 2017 Handle case that we do not listen at all more gracefully in MHD_start_daemon() and not pass '-1' to helper functions diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c index 680a9b99..98f17192 100644 --- a/src/microhttpd/daemon.c +++ b/src/microhttpd/daemon.c @@ -3131,7 +3131,7 @@ MHD_get_timeout (struct MHD_Daemon *daemon, if (second_left > ULLONG_MAX / 1000) *timeout = ULLONG_MAX; else - *timeout = 1000 * second_left; + *timeout = 1000LL * second_left; } return MHD_YES; }