summaryrefslogtreecommitdiffstats
path: root/authfd.c
diff options
context:
space:
mode:
authormarkus@openbsd.org <markus@openbsd.org>2015-03-24 21:09:11 +0100
committerDamien Miller <djm@mindrot.org>2015-03-27 02:00:52 +0100
commit7d4f96f9de2a18af0d9fa75ea89a4990de0344f5 (patch)
tree783c123d1bccf5308397bafc34fa9770b0b061b7 /authfd.c
parentupstream commit (diff)
downloadopenssh-7d4f96f9de2a18af0d9fa75ea89a4990de0344f5.tar.xz
openssh-7d4f96f9de2a18af0d9fa75ea89a4990de0344f5.zip
upstream commit
consistent check for NULL as noted by Nicholas Lemonias; ok djm@
Diffstat (limited to 'authfd.c')
-rw-r--r--authfd.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/authfd.c b/authfd.c
index 5d9414faf..e65bcab0c 100644
--- a/authfd.c
+++ b/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
@@ -469,7 +469,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) {