diff options
author | Dag-Erling Smørgrav <des@FreeBSD.org> | 2014-03-25 11:05:34 +0000 |
---|---|---|
committer | Dag-Erling Smørgrav <des@FreeBSD.org> | 2014-03-25 11:05:34 +0000 |
commit | b83788ff878a6b12efc40bed6f01048149338592 (patch) | |
tree | 5f5bce301eb69c1bba7123161572915c7e55375b /crypto/openssh/session.c | |
parent | fe47fb7b1c7155a1a947b6754b3a928aa0cda6e6 (diff) | |
parent | 0c79dacc8a8d4de2455d61c51724866f667ba53c (diff) |
Upgrade to OpenSSH 6.6p1.
Notes
Notes:
svn path=/head/; revision=263712
Diffstat (limited to 'crypto/openssh/session.c')
-rw-r--r-- | crypto/openssh/session.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/crypto/openssh/session.c b/crypto/openssh/session.c index e4c58fb435b8..9fe6a1ad26a6 100644 --- a/crypto/openssh/session.c +++ b/crypto/openssh/session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: session.c,v 1.269 2014/01/18 09:36:26 dtucker Exp $ */ +/* $OpenBSD: session.c,v 1.270 2014/01/31 16:39:19 tedu Exp $ */ /* $FreeBSD$ */ /* * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -983,6 +983,11 @@ child_set_env(char ***envp, u_int *envsizep, const char *name, u_int envsize; u_int i, namelen; + if (strchr(name, '=') != NULL) { + error("Invalid environment variable \"%.100s\"", name); + return; + } + /* * If we're passed an uninitialized list, allocate a single null * entry before continuing. @@ -1905,7 +1910,7 @@ session_unused(int id) fatal("%s: insane session id %d (max %d nalloc %d)", __func__, id, options.max_sessions, sessions_nalloc); } - bzero(&sessions[id], sizeof(*sessions)); + memset(&sessions[id], 0, sizeof(*sessions)); sessions[id].self = id; sessions[id].used = 0; sessions[id].chanid = -1; @@ -2241,8 +2246,8 @@ session_env_req(Session *s) char *name, *val; u_int name_len, val_len, i; - name = packet_get_string(&name_len); - val = packet_get_string(&val_len); + name = packet_get_cstring(&name_len); + val = packet_get_cstring(&val_len); packet_check_eom(); /* Don't set too many environment variables */ |