From fe0a6d3e012d1097775d5841b0e3ddbe5c8e499e Mon Sep 17 00:00:00 2001 From: djm Date: Tue, 8 Jun 2021 22:06:12 +0000 Subject: [PATCH] fix regression in r1.356: for ssh_config options that accepted multiple string arguments, ssh was only recording the first. Reported by Lucas via bugs@ --- usr.bin/ssh/readconf.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/usr.bin/ssh/readconf.c b/usr.bin/ssh/readconf.c index c68c26ad7e3..44c94d76954 100644 --- a/usr.bin/ssh/readconf.c +++ b/usr.bin/ssh/readconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: readconf.c,v 1.356 2021/06/08 07:07:15 djm Exp $ */ +/* $OpenBSD: readconf.c,v 1.357 2021/06/08 22:06:12 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -1229,6 +1229,7 @@ parse_string: max_entries = SSH_MAX_HOSTS_FILES; parse_char_array: i = 0; + value = *uintptr == 0; /* was array empty when we started? */ while ((arg = argv_next(&ac, &av)) != NULL) { if (*arg == '\0') { error("%s line %d: keyword %s empty argument", @@ -1245,7 +1246,7 @@ parse_char_array: } } i++; - if (*activep && *uintptr == 0) { + if (*activep && value) { if ((*uintptr) >= max_entries) { error("%s line %d: too many %s " "entries.", filename, linenum, -- 2.20.1