summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/sshconnect2.c
diff options
context:
space:
mode:
authordjm <djm@openbsd.org>2015-05-04 06:10:48 +0000
committerdjm <djm@openbsd.org>2015-05-04 06:10:48 +0000
commit59480edead391337354aa3173c0e72de67c8490e (patch)
tree68350843474d6c50a3f1db7bd12d0fa2c6910148 /usr.bin/ssh/sshconnect2.c
parentFix some misuse of the | operator. In particular | has higher (diff)
downloadwireguard-openbsd-59480edead391337354aa3173c0e72de67c8490e.tar.xz
wireguard-openbsd-59480edead391337354aa3173c0e72de67c8490e.zip
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 'usr.bin/ssh/sshconnect2.c')
-rw-r--r--usr.bin/ssh/sshconnect2.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.bin/ssh/sshconnect2.c b/usr.bin/ssh/sshconnect2.c
index 9af29559d9a..c3249d52cae 100644
--- a/usr.bin/ssh/sshconnect2.c
+++ b/usr.bin/ssh/sshconnect2.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshconnect2.c,v 1.223 2015/01/30 11:43:14 djm Exp $ */
+/* $OpenBSD: sshconnect2.c,v 1.224 2015/05/04 06:10:48 djm Exp $ */
/*
* Copyright (c) 2000 Markus Friedl. All rights reserved.
* Copyright (c) 2008 Damien Miller. All rights reserved.
@@ -1602,8 +1602,7 @@ userauth_hostbased(Authctxt *authctxt)
continue;
if (match_pattern_list(
sshkey_ssh_name(authctxt->sensitive->keys[i]),
- authctxt->active_ktype,
- strlen(authctxt->active_ktype), 0) != 1)
+ authctxt->active_ktype, 0) != 1)
continue;
/* we take and free the key */
private = authctxt->sensitive->keys[i];