[openssh-commits] [openssh] 01/01: upstream: explicit long long type in timing calculations (doesn't
git+noreply at mindrot.org
git+noreply at mindrot.org
Mon Aug 28 14:08:05 AEST 2023
This is an automated email from the git hooks/post-receive script.
djm pushed a commit to branch master
in repository openssh.
commit 3867361ca691d0956ef7d5fb8181cf554a91d84a
Author: djm at openbsd.org <djm at openbsd.org>
Date: Mon Aug 28 04:06:52 2023 +0000
upstream: explicit long long type in timing calculations (doesn't
matter, since the range is pre-clamped)
OpenBSD-Commit-ID: f786ed902d04a5b8ecc581d068fea1a79aa772de
---
clientloop.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/clientloop.c b/clientloop.c
index 94ff2cb9..a0c3ed8d 100644
--- a/clientloop.c
+++ b/clientloop.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: clientloop.c,v 1.393 2023/08/28 03:31:16 djm Exp $ */
+/* $OpenBSD: clientloop.c,v 1.394 2023/08/28 04:06:52 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo at cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo at cs.hut.fi>, Espoo, Finland
@@ -618,9 +618,9 @@ obfuscate_keystroke_timing(struct ssh *ssh, struct timespec *timeout)
return 0;
/* Calculate number of intervals missed since the last check */
- n = (now.tv_sec - next_interval.tv_sec) * 1000 * 1000 * 1000;
+ n = (now.tv_sec - next_interval.tv_sec) * 1000LL * 1000 * 1000;
n += now.tv_nsec - next_interval.tv_nsec;
- n /= options.obscure_keystroke_timing_interval * 1000 * 1000;
+ n /= options.obscure_keystroke_timing_interval * 1000LL * 1000;
n = (n < 0) ? 1 : n + 1;
/* Advance to the next interval */
--
To stop receiving notification emails like this one, please contact
djm at mindrot.org.
More information about the openssh-commits
mailing list