summaryrefslogtreecommitdiffstats
path: root/crypto/openssh/ssh-agent.c
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2009-10-01 17:12:52 +0000
committerdes <des@FreeBSD.org>2009-10-01 17:12:52 +0000
commitc6a1085feffa5fcd9040272aeae30e7f2466f754 (patch)
tree927d2417c80c4c448ee45c25269ecab7af8f482e /crypto/openssh/ssh-agent.c
parent4f56708582006aca1db129a86ef646499265ee9a (diff)
parent98b8242e22b0fc941b830dcec63d235b01bd46a2 (diff)
downloadFreeBSD-src-c6a1085feffa5fcd9040272aeae30e7f2466f754.zip
FreeBSD-src-c6a1085feffa5fcd9040272aeae30e7f2466f754.tar.gz
Upgrade to OpenSSH 5.3p1.
Diffstat (limited to 'crypto/openssh/ssh-agent.c')
-rw-r--r--crypto/openssh/ssh-agent.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/crypto/openssh/ssh-agent.c b/crypto/openssh/ssh-agent.c
index ef62f19..1fdf529 100644
--- a/crypto/openssh/ssh-agent.c
+++ b/crypto/openssh/ssh-agent.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-agent.c,v 1.159 2008/06/28 14:05:15 djm Exp $ */
+/* $OpenBSD: ssh-agent.c,v 1.161 2009/03/23 19:38:04 tobias Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -1062,6 +1062,7 @@ main(int ac, char **av)
pid_t pid;
char pidstrbuf[1 + 3 * sizeof pid];
struct timeval *tvp = NULL;
+ size_t len;
/* Ensure that fds 0, 1 and 2 are open or directed to /dev/null */
sanitise_stdfd();
@@ -1123,8 +1124,8 @@ main(int ac, char **av)
if (ac == 0 && !c_flag && !s_flag) {
shell = getenv("SHELL");
- if (shell != NULL &&
- strncmp(shell + strlen(shell) - 3, "csh", 3) == 0)
+ if (shell != NULL && (len = strlen(shell)) > 2 &&
+ strncmp(shell + len - 3, "csh", 3) == 0)
c_flag = 1;
}
if (k_flag) {
OpenPOWER on IntegriCloud