]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
upstream commit
authormarkus@openbsd.org <markus@openbsd.org>
Thu, 26 Mar 2015 19:32:19 +0000 (19:32 +0000)
committerDamien Miller <djm@mindrot.org>
Fri, 27 Mar 2015 01:02:38 +0000 (12:02 +1100)
sigp and lenp are not optional in ssh_agent_sign(); ok
 djm@

authfd.c

index 9ed5d2f1848c7b658b4ace8d6fda6a1fdf6befb3..82915a43d633274fcbb71df6ccd9f576f168bdcb 100644 (file)
--- a/authfd.c
+++ b/authfd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: authfd.c,v 1.96 2015/03/25 19:21:48 markus Exp $ */
+/* $OpenBSD: authfd.c,v 1.97 2015/03/26 19:32:19 markus Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -438,10 +438,8 @@ ssh_agent_sign(int sock, struct sshkey *key,
        u_int flags = 0;
        int r = SSH_ERR_INTERNAL_ERROR;
 
-       if (sigp != NULL)
-               *sigp = NULL;
-       if (lenp != NULL)
-               *lenp = 0;
+       *sigp = NULL;
+       *lenp = 0;
 
        if (datalen > SSH_KEY_MAX_SIGN_DATA_SIZE)
                return SSH_ERR_INVALID_ARGUMENT;
@@ -469,8 +467,7 @@ ssh_agent_sign(int sock, struct sshkey *key,
        }
        if ((r = sshbuf_get_string(msg, sigp, &len)) != 0)
                goto out;
-       if (lenp != NULL)
-               *lenp = len;
+       *lenp = len;
        r = 0;
  out:
        if (blob != NULL) {