From 1f72f772b8a09130d07e911a1a3d9a82730ff14b Mon Sep 17 00:00:00 2001 From: djm Date: Thu, 19 Nov 2015 08:23:27 +0000 Subject: ban ConnectionAttempts=0, it makes no sense and would cause ssh_connect_direct() to print an uninitialised stack variable; bz#2500 reported by dvw AT phas.ubc.ca --- usr.bin/ssh/ssh.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'usr.bin/ssh/ssh.c') diff --git a/usr.bin/ssh/ssh.c b/usr.bin/ssh/ssh.c index 7021bc54a3d..ce7222a696b 100644 --- a/usr.bin/ssh/ssh.c +++ b/usr.bin/ssh/ssh.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh.c,v 1.429 2015/10/25 23:42:00 dtucker Exp $ */ +/* $OpenBSD: ssh.c,v 1.430 2015/11/19 08:23:27 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -1066,6 +1066,9 @@ main(int ac, char **av) "disabling"); options.update_hostkeys = 0; } + if (options.connection_attempts <= 0) + fatal("Invalid number of ConnectionAttempts"); + if (original_effective_uid != 0) options.use_privileged_port = 0; -- cgit v1.2.3-59-g8ed1b