From 3089f59c10ecf4d4bc062b1e2a202734003d1a4a Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Tue, 8 Mar 2016 13:46:19 -0600 Subject: [PATCH] modules: using labs() for date math is unsafe --- ircd/modules.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ircd/modules.c b/ircd/modules.c index fcb28477..72fe3f08 100644 --- a/ircd/modules.c +++ b/ircd/modules.c @@ -915,7 +915,7 @@ load_a_module(const char *path, int warn, int origin, int core) */ if(mheader->mapi_datecode != datecode && mheader->mapi_datecode > 0) { - long int delta = labs(datecode - mheader->mapi_datecode); + long int delta = datecode - mheader->mapi_datecode; if (delta > MOD_WARN_DELTA) { delta /= 86400;