From 028f25b942acb5480bc540e7aa0c43fa3914f99d Mon Sep 17 00:00:00 2001 From: Francesco Cozzuto Date: Sat, 17 Jan 2026 01:14:51 +0100 Subject: [PATCH] Fix signed integer overflow in time calculation --- quakey/src/quakey.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/quakey/src/quakey.c b/quakey/src/quakey.c index ab90b0d..7e9d2e7 100644 --- a/quakey/src/quakey.c +++ b/quakey/src/quakey.c @@ -1041,7 +1041,7 @@ static void host_init(Host *host, Sim *sim, QuakeySpawn config, char *arg) } if (host->poll_timeout > -1) - time_event_wakeup(host->sim, host->sim->current_time + host->poll_timeout * 1000000, host); + time_event_wakeup(host->sim, host->sim->current_time + (Nanos)host->poll_timeout * 1000000ULL, host); } static void host_free(Host *host) @@ -1227,7 +1227,7 @@ static void host_update(Host *host) } if (host->poll_timeout > -1) - time_event_wakeup(host->sim, host->sim->current_time + host->poll_timeout * 1000000, host); + time_event_wakeup(host->sim, host->sim->current_time + (Nanos)host->poll_timeout * 1000000ULL, host); } static bool host_has_addr(Host *host, Addr addr)