diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 2015-03-26 19:32:20 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 2015-03-26 19:32:20 +0000 |
commit | 8ec8a98046a1296045e16eb3c678256f752ad8e3 (patch) | |
tree | 3b52c8ffdb4092e9d3b5f51cd2b10c6dcbd9bf26 /usr.bin/ssh/authfd.c | |
parent | 47b34f2b729dd17b6d06ff9c5836a33f27e50a33 (diff) |
sigp and lenp are not optional in ssh_agent_sign(); ok djm@
Diffstat (limited to 'usr.bin/ssh/authfd.c')
-rw-r--r-- | usr.bin/ssh/authfd.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/usr.bin/ssh/authfd.c b/usr.bin/ssh/authfd.c index 898deaef3de..fab5e6d0278 100644 --- a/usr.bin/ssh/authfd.c +++ b/usr.bin/ssh/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 @@ -436,10 +436,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; @@ -467,8 +465,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) { |