mirror of
https://git.gnunet.org/libmicrohttpd.git
synced 2026-09-25 04:09:31 +03:00
fix COV 164298: integer overflow on multiplying timeout
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user