[openssh-commits] [openssh] 02/03: upstream commit

git+noreply at mindrot.org git+noreply at mindrot.org
Fri Oct 16 10:54:26 AEDT 2015


This is an automated email from the git hooks/post-receive script.

djm pushed a commit to branch master
in repository openssh.

commit 1a2663a15d356bb188196b6414b4c50dc12fd42b
Author: djm at openbsd.org <djm at openbsd.org>
Date:   Thu Oct 15 23:08:23 2015 +0000

    upstream commit
    
    argument to sshkey_from_private() and sshkey_demote()
     can't be NULL
    
    Upstream-ID: 0111245b1641d387977a9b38da15916820a5fd1f
---
 sshkey.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/sshkey.c b/sshkey.c
index 3dd8907..7ceb915 100644
--- a/sshkey.c
+++ b/sshkey.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshkey.c,v 1.23 2015/09/13 14:39:16 tim Exp $ */
+/* $OpenBSD: sshkey.c,v 1.24 2015/10/15 23:08:23 djm Exp $ */
 /*
  * Copyright (c) 2000, 2001 Markus Friedl.  All rights reserved.
  * Copyright (c) 2008 Alexander von Gernler.  All rights reserved.
@@ -1758,9 +1758,7 @@ sshkey_from_private(const struct sshkey *k, struct sshkey **pkp)
 	struct sshkey *n = NULL;
 	int ret = SSH_ERR_INTERNAL_ERROR;
 
-	if (pkp != NULL)
-		*pkp = NULL;
-
+	*pkp = NULL;
 	switch (k->type) {
 #ifdef WITH_OPENSSL
 	case KEY_DSA:
@@ -2243,9 +2241,7 @@ sshkey_demote(const struct sshkey *k, struct sshkey **dkp)
 	struct sshkey *pk;
 	int ret = SSH_ERR_INTERNAL_ERROR;
 
-	if (dkp != NULL)
-		*dkp = NULL;
-
+	*dkp = NULL;
 	if ((pk = calloc(1, sizeof(*pk))) == NULL)
 		return SSH_ERR_ALLOC_FAIL;
 	pk->type = k->type;

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list