summaryrefslogtreecommitdiff
path: root/clientloop.c
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2015-05-04 06:10:48 +0000
committerDamien Miller <djm@mindrot.org>2015-05-10 11:38:04 +1000
commite661a86353e11592c7ed6a847e19a83609f49e77 (patch)
tree5fe2c206d56dd4296a79e20ca6cfbbb83cb7c40c /clientloop.c
parent0ef1de742be2ee4b10381193fe90730925b7f027 (diff)
upstream commit
Remove pattern length argument from match_pattern_list(), we only ever use it for strlen(pattern). Prompted by hanno AT hboeck.de pointing an out-of-bound read error caused by an incorrect pattern length found using AFL and his own tools. ok markus@
Diffstat (limited to 'clientloop.c')
-rw-r--r--clientloop.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/clientloop.c b/clientloop.c
index a9c8a90f0..040deb992 100644
--- a/clientloop.c
+++ b/clientloop.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: clientloop.c,v 1.272 2015/02/25 19:54:02 djm Exp $ */ 1/* $OpenBSD: clientloop.c,v 1.273 2015/05/04 06:10:48 djm 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
@@ -2352,8 +2352,7 @@ client_input_hostkeys(void)
2352 /* Check that the key is accepted in HostkeyAlgorithms */ 2352 /* Check that the key is accepted in HostkeyAlgorithms */
2353 if (options.hostkeyalgorithms != NULL && 2353 if (options.hostkeyalgorithms != NULL &&
2354 match_pattern_list(sshkey_ssh_name(key), 2354 match_pattern_list(sshkey_ssh_name(key),
2355 options.hostkeyalgorithms, 2355 options.hostkeyalgorithms, 0) != 1) {
2356 strlen(options.hostkeyalgorithms), 0) != 1) {
2357 debug3("%s: %s key not permitted by HostkeyAlgorithms", 2356 debug3("%s: %s key not permitted by HostkeyAlgorithms",
2358 __func__, sshkey_ssh_name(key)); 2357 __func__, sshkey_ssh_name(key));
2359 continue; 2358 continue;