[openssh-commits] [openssh] 02/03: upstream: match_user() shouldn't be called with user==NULL unless
git+noreply at mindrot.org
git+noreply at mindrot.org
Thu Apr 6 13:27:26 AEST 2023
This is an automated email from the git hooks/post-receive script.
djm pushed a commit to branch master
in repository openssh.
commit 2519110659a1efac6c976895a86659d1b341c91b
Author: djm at openbsd.org <djm at openbsd.org>
Date: Thu Apr 6 03:19:32 2023 +0000
upstream: match_user() shouldn't be called with user==NULL unless
host and ipaddr are also NULL
OpenBSD-Commit-ID: fa3518346c21483e9e01a2e4b9436ae501daf8ea
---
match.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/match.c b/match.c
index 3ac854d3..d6af2561 100644
--- a/match.c
+++ b/match.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: match.c,v 1.43 2020/11/03 22:53:12 djm Exp $ */
+/* $OpenBSD: match.c,v 1.44 2023/04/06 03:19:32 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo at cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo at cs.hut.fi>, Espoo, Finland
@@ -247,6 +247,9 @@ match_user(const char *user, const char *host, const char *ipaddr,
return 0;
}
+ if (user == NULL)
+ return 0; /* shouldn't happen */
+
if ((p = strchr(pattern, '@')) == NULL)
return match_pattern(user, pattern);
--
To stop receiving notification emails like this one, please contact
djm at mindrot.org.
More information about the openssh-commits
mailing list