diff options
author | Colin Watson <cjwatson@debian.org> | 2014-03-20 00:32:39 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2014-03-20 00:34:16 +0000 |
commit | 2ee2de47fd0f684f54218d31b4ec83930e69c18e (patch) | |
tree | 86848a7668424b392d48791a0e41e05f9df7b62b /session.c | |
parent | c9947303ad3c432b1cadfbeb1d95a7cd38662d66 (diff) | |
parent | 9cbb60f5e4932634db04c330c88abc49cc5567bd (diff) |
Merge 6.6p1.
* New upstream release (http://www.openssh.com/txt/release-6.6).
Diffstat (limited to 'session.c')
-rw-r--r-- | session.c | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: session.c,v 1.269 2014/01/18 09:36:26 dtucker Exp $ */ | 1 | /* $OpenBSD: session.c,v 1.270 2014/01/31 16:39:19 tedu Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 3 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
4 | * All rights reserved | 4 | * All rights reserved |
@@ -979,6 +979,11 @@ child_set_env(char ***envp, u_int *envsizep, const char *name, | |||
979 | u_int envsize; | 979 | u_int envsize; |
980 | u_int i, namelen; | 980 | u_int i, namelen; |
981 | 981 | ||
982 | if (strchr(name, '=') != NULL) { | ||
983 | error("Invalid environment variable \"%.100s\"", name); | ||
984 | return; | ||
985 | } | ||
986 | |||
982 | /* | 987 | /* |
983 | * If we're passed an uninitialized list, allocate a single null | 988 | * If we're passed an uninitialized list, allocate a single null |
984 | * entry before continuing. | 989 | * entry before continuing. |
@@ -1898,7 +1903,7 @@ session_unused(int id) | |||
1898 | fatal("%s: insane session id %d (max %d nalloc %d)", | 1903 | fatal("%s: insane session id %d (max %d nalloc %d)", |
1899 | __func__, id, options.max_sessions, sessions_nalloc); | 1904 | __func__, id, options.max_sessions, sessions_nalloc); |
1900 | } | 1905 | } |
1901 | bzero(&sessions[id], sizeof(*sessions)); | 1906 | memset(&sessions[id], 0, sizeof(*sessions)); |
1902 | sessions[id].self = id; | 1907 | sessions[id].self = id; |
1903 | sessions[id].used = 0; | 1908 | sessions[id].used = 0; |
1904 | sessions[id].chanid = -1; | 1909 | sessions[id].chanid = -1; |
@@ -2234,8 +2239,8 @@ session_env_req(Session *s) | |||
2234 | char *name, *val; | 2239 | char *name, *val; |
2235 | u_int name_len, val_len, i; | 2240 | u_int name_len, val_len, i; |
2236 | 2241 | ||
2237 | name = packet_get_string(&name_len); | 2242 | name = packet_get_cstring(&name_len); |
2238 | val = packet_get_string(&val_len); | 2243 | val = packet_get_cstring(&val_len); |
2239 | packet_check_eom(); | 2244 | packet_check_eom(); |
2240 | 2245 | ||
2241 | /* Don't set too many environment variables */ | 2246 | /* Don't set too many environment variables */ |