summaryrefslogtreecommitdiff
path: root/usr.bin/ssh/serverloop.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@cvs.openbsd.org>2013-12-19 00:19:13 +0000
committerDarren Tucker <dtucker@cvs.openbsd.org>2013-12-19 00:19:13 +0000
commit99d77a463e8cbdff03565d5dea9091e88fddfbe2 (patch)
tree27cd2acadee43aa9e8a30bf549bf5a02adfcda54 /usr.bin/ssh/serverloop.c
parentd4dff735c07177bd7a94db2df97bd0cd68677665 (diff)
Cast client_alive_interval to u_int64_t before assinging to
max_time_milliseconds to avoid potential integer overflow in the timeout. bz#2170, patch from Loganaden Velvindron, ok djm@
Diffstat (limited to 'usr.bin/ssh/serverloop.c')
-rw-r--r--usr.bin/ssh/serverloop.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/ssh/serverloop.c b/usr.bin/ssh/serverloop.c
index bb0c617ac66..58eeba10ca1 100644
--- a/usr.bin/ssh/serverloop.c
+++ b/usr.bin/ssh/serverloop.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: serverloop.c,v 1.168 2013/07/12 00:19:59 djm Exp $ */
+/* $OpenBSD: serverloop.c,v 1.169 2013/12/19 00:19:12 dtucker Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -297,7 +297,8 @@ wait_until_can_do_something(fd_set **readsetp, fd_set **writesetp, int *maxfdp,
if (compat20 &&
max_time_milliseconds == 0 && options.client_alive_interval) {
client_alive_scheduled = 1;
- max_time_milliseconds = options.client_alive_interval * 1000;
+ max_time_milliseconds =
+ (u_int64_t)options.client_alive_interval * 1000;
}
if (compat20) {