summaryrefslogtreecommitdiff
path: root/serverloop.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2013-12-29 17:44:29 +1100
committerDamien Miller <djm@mindrot.org>2013-12-29 17:44:29 +1100
commitbb3dafe7024a5b4e851252e65ee35d45b965e4a8 (patch)
treeb36a42f7f0a058295c02b39c8b2839548d0de19b /serverloop.c
parentef275ead3dcadde4db1efe7a0aa02b5e618ed40c (diff)
- dtucker@cvs.openbsd.org 2013/12/19 00:19:12
[serverloop.c] 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 'serverloop.c')
-rw-r--r--serverloop.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/serverloop.c b/serverloop.c
index ccbad617d..5b2f8028d 100644
--- a/serverloop.c
+++ b/serverloop.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: serverloop.c,v 1.168 2013/07/12 00:19:59 djm Exp $ */ 1/* $OpenBSD: serverloop.c,v 1.169 2013/12/19 00:19:12 dtucker Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -304,7 +304,8 @@ wait_until_can_do_something(fd_set **readsetp, fd_set **writesetp, int *maxfdp,
304 if (compat20 && 304 if (compat20 &&
305 max_time_milliseconds == 0 && options.client_alive_interval) { 305 max_time_milliseconds == 0 && options.client_alive_interval) {
306 client_alive_scheduled = 1; 306 client_alive_scheduled = 1;
307 max_time_milliseconds = options.client_alive_interval * 1000; 307 max_time_milliseconds =
308 (u_int64_t)options.client_alive_interval * 1000;
308 } 309 }
309 310
310 if (compat20) { 311 if (compat20) {