diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2023-08-28 04:06:53 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2023-08-28 04:06:53 +0000 |
commit | 0426c7f36b00efc958b22956c3dd3ec91cf6c1d9 (patch) | |
tree | 75bbf9761fc70102888133c7fa35452eac6a50f4 /usr.bin | |
parent | 620698a5737b3cc7e7acbc2b222a31987c160c92 (diff) |
explicit long long type in timing calculations (doesn't matter, since
the range is pre-clamped)
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/ssh/clientloop.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/ssh/clientloop.c b/usr.bin/ssh/clientloop.c index 67228179b5e..035643f9e09 100644 --- a/usr.bin/ssh/clientloop.c +++ b/usr.bin/ssh/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@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -609,9 +609,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 */ |