From e88faee9dd533a98d1cad4eeaa9c35be27a700fa Mon Sep 17 00:00:00 2001 From: Vincent Penquerc'h Date: Fri, 27 Dec 2013 14:32:33 -0500 Subject: [PATCH] qrexec-daemon: reject negative timeouts --- qrexec/qrexec-daemon.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qrexec/qrexec-daemon.c b/qrexec/qrexec-daemon.c index 728ece7..36b9389 100644 --- a/qrexec/qrexec-daemon.c +++ b/qrexec/qrexec-daemon.c @@ -152,8 +152,8 @@ void init(int xid) startup_timeout_str = getenv("QREXEC_STARTUP_TIMEOUT"); if (startup_timeout_str) { startup_timeout = atoi(startup_timeout_str); - if (startup_timeout == 0) - // invalid number + if (startup_timeout <= 0) + // invalid or negative number startup_timeout = MAX_STARTUP_TIME_DEFAULT; } signal(SIGUSR1, sigusr1_handler);