commit 3d10c87bf0a3b172c24d1b4ecfe90cce6745bd07
parent 26438a2557ea657bb555b6ead2ab23bd4db23361
Author: Amitai Schleier <schmonz-web-git@schmonz.com>
Date: Wed, 2 Dec 2020 11:33:29 +0100
Fix CodeQL cpp/integer-multiplication-cast-to-long.
"Multiplication result may overflow 'int' before it is converted to 'long'."
Make n a datetime_sec (synonym for long) to begin with.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/qmail-send.c b/qmail-send.c
@@ -1043,7 +1043,7 @@ datetime_sec nextretry(birth,c)
datetime_sec birth;
int c;
{
- int n;
+ datetime_sec n;
if (birth > recent) n = 0;
else n = squareroot(recent - birth); /* no need to add fuzz to recent */