[openssh-commits] [openssh] 01/01: upstream: better error code for bad arguments; inspired by
git+noreply at mindrot.org
git+noreply at mindrot.org
Fri Sep 6 12:01:49 AEST 2019
This is an automated email from the git hooks/post-receive script.
djm pushed a commit to branch master
in repository openssh.
commit 00865c29690003b4523cc09a0e104724b9f911a4
Author: djm at openbsd.org <djm at openbsd.org>
Date: Fri Sep 6 01:58:50 2019 +0000
upstream: better error code for bad arguments; inspired by
OpenBSD-Commit-ID: dfc263b6041de7f0ed921a1de0b81ddebfab1e0a
---
kex.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/kex.c b/kex.c
index 1eb27264..84f8e2aa 100644
--- a/kex.c
+++ b/kex.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kex.c,v 1.152 2019/09/05 09:35:19 djm Exp $ */
+/* $OpenBSD: kex.c,v 1.153 2019/09/06 01:58:50 djm Exp $ */
/*
* Copyright (c) 2000, 2001 Markus Friedl. All rights reserved.
*
@@ -223,7 +223,10 @@ kex_assemble_names(char **listp, const char *def, const char *all)
char *list = NULL, *ret = NULL, *matching = NULL, *opatterns = NULL;
int r = SSH_ERR_INTERNAL_ERROR;
- if (listp == NULL || *listp == NULL || **listp == '\0') {
+ if (listp == NULL || def == NULL || all == NULL)
+ return SSH_ERR_INVALID_ARGUMENT;
+
+ if (*listp == NULL || **listp == '\0') {
if ((*listp = strdup(def)) == NULL)
return SSH_ERR_ALLOC_FAIL;
return 0;
--
To stop receiving notification emails like this one, please contact
djm at mindrot.org.
More information about the openssh-commits
mailing list