summaryrefslogtreecommitdiff
path: root/hostfile.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 /hostfile.c
parent0ef1de742be2ee4b10381193fe90730925b7f027 (diff)
downloadopenssh-git-e661a86353e11592c7ed6a847e19a83609f49e77.tar.gz
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 'hostfile.c')
-rw-r--r--hostfile.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hostfile.c b/hostfile.c
index d9fdcb87..2850a479 100644
--- a/hostfile.c
+++ b/hostfile.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hostfile.c,v 1.65 2015/03/31 22:57:06 djm Exp $ */
+/* $OpenBSD: hostfile.c,v 1.66 2015/05/04 06:10:48 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -663,7 +663,7 @@ match_maybe_hashed(const char *host, const char *names, int *was_hashed)
return nlen == strlen(hashed_host) &&
strncmp(hashed_host, names, nlen) == 0;
}
- return match_hostname(host, names, nlen) == 1;
+ return match_hostname(host, names) == 1;
}
int