mirror of
https://github.com/openbsd/src.git
synced 2026-05-01 17:46:35 +00:00
Fix possible sshd crash when sshd_config set MaxStartups to a
value <10 using the single-argument form of MaxStartups (e.g. MaxStartups=3). This doesn't affect the three-argument form of the directive (e.g. MaxStartups 3:20:5). Patch from Peter Kaestle via bz3941
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: servconf.c,v 1.445 2026/02/17 21:45:07 djm Exp $ */
|
||||
/* $OpenBSD: servconf.c,v 1.446 2026/04/02 07:38:14 djm Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
||||
* All rights reserved
|
||||
@@ -1946,12 +1946,12 @@ process_server_config_line_depth(ServerOptions *options, char *line,
|
||||
filename, linenum, keyword);
|
||||
} else if (n == 1) {
|
||||
value3 = value;
|
||||
value = value2 = -1;
|
||||
value2 = -1;
|
||||
} else {
|
||||
fatal("%s line %d: Invalid %s spec.",
|
||||
filename, linenum, keyword);
|
||||
}
|
||||
if (value3 <= 0 || (value2 != -1 && value <= 0))
|
||||
if (value <= 0 || value3 <= 0)
|
||||
fatal("%s line %d: Invalid %s spec.",
|
||||
filename, linenum, keyword);
|
||||
if (*activep && options->max_startups == -1) {
|
||||
|
||||
Reference in New Issue
Block a user