diff options
author | Darren Tucker <dtucker@cvs.openbsd.org> | 2020-05-29 01:20:47 +0000 |
---|---|---|
committer | Darren Tucker <dtucker@cvs.openbsd.org> | 2020-05-29 01:20:47 +0000 |
commit | d6af161b33c81e1822711bd3d7feb8708835d990 (patch) | |
tree | 2a33b27bd1bae4ceaac9ef19859091aa0612f5ba /usr.bin | |
parent | 5d445cdea8cf06ce66000189c48891b854cedd86 (diff) |
Fix multiplier in convtime when handling seconds after other units.
bz#3171, spotted by ronf at timeheart.net, ok djm@.
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/ssh/misc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/ssh/misc.c b/usr.bin/ssh/misc.c index 0f5bbaf432f..e52656cad21 100644 --- a/usr.bin/ssh/misc.c +++ b/usr.bin/ssh/misc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: misc.c,v 1.148 2020/05/26 01:06:52 djm Exp $ */ +/* $OpenBSD: misc.c,v 1.149 2020/05/29 01:20:46 dtucker Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * Copyright (c) 2005-2020 Damien Miller. All rights reserved. @@ -452,7 +452,7 @@ a2tun(const char *s, int *remote) long convtime(const char *s) { - long total, secs, multiplier = 1; + long total, secs, multiplier; const char *p; char *endp; @@ -470,6 +470,7 @@ convtime(const char *s) secs < 0) return -1; + multiplier = 1; switch (*endp++) { case '\0': endp--; |