diff options
Diffstat (limited to 'usr.bin/ssh')
-rw-r--r-- | usr.bin/ssh/authfd.c | 5 | ||||
-rw-r--r-- | usr.bin/ssh/ssh-keysign.c | 4 |
2 files changed, 5 insertions, 4 deletions
diff --git a/usr.bin/ssh/authfd.c b/usr.bin/ssh/authfd.c index f7e6f1e934b..01c9fa12f10 100644 --- a/usr.bin/ssh/authfd.c +++ b/usr.bin/ssh/authfd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: authfd.c,v 1.94 2015/01/14 20:05:27 djm Exp $ */ +/* $OpenBSD: authfd.c,v 1.95 2015/03/24 20:09:11 markus Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -467,7 +467,8 @@ ssh_agent_sign(int sock, struct sshkey *key, } if ((r = sshbuf_get_string(msg, sigp, &len)) != 0) goto out; - *lenp = len; + if (*lenp != NULL) + *lenp = len; r = 0; out: if (blob != NULL) { diff --git a/usr.bin/ssh/ssh-keysign.c b/usr.bin/ssh/ssh-keysign.c index 0196b60ffba..cd92a563760 100644 --- a/usr.bin/ssh/ssh-keysign.c +++ b/usr.bin/ssh/ssh-keysign.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-keysign.c,v 1.47 2015/01/28 22:36:00 djm Exp $ */ +/* $OpenBSD: ssh-keysign.c,v 1.48 2015/03/24 20:09:11 markus Exp $ */ /* * Copyright (c) 2002 Markus Friedl. All rights reserved. * @@ -147,7 +147,7 @@ valid_request(struct passwd *pw, char *host, struct sshkey **ret, if (fail && key != NULL) sshkey_free(key); - else + else if (ret != NULL) *ret = key; return (fail ? -1 : 0); |