summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--authfd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/authfd.c b/authfd.c
index ecdd869ab..cc9c6502d 100644
--- a/authfd.c
+++ b/authfd.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: authfd.c,v 1.111 2018/07/09 21:59:10 markus Exp $ */ 1/* $OpenBSD: authfd.c,v 1.112 2018/11/30 02:24:52 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -94,7 +94,7 @@ ssh_get_authentication_socket(int *fdp)
94 *fdp = -1; 94 *fdp = -1;
95 95
96 authsocket = getenv(SSH_AUTHSOCKET_ENV_NAME); 96 authsocket = getenv(SSH_AUTHSOCKET_ENV_NAME);
97 if (!authsocket) 97 if (authsocket == NULL || *authsocket == '\0')
98 return SSH_ERR_AGENT_NOT_PRESENT; 98 return SSH_ERR_AGENT_NOT_PRESENT;
99 99
100 memset(&sunaddr, 0, sizeof(sunaddr)); 100 memset(&sunaddr, 0, sizeof(sunaddr));