- djm@cvs.openbsd.org 2012/01/07 21:11:36

[mux.c]
     fix double-free in new session handler
This commit is contained in:
Damien Miller 2012-02-11 08:16:28 +11:00
parent a2876db5e6
commit 2ec0342ed4
2 changed files with 5 additions and 4 deletions

View File

@ -3,6 +3,9 @@
- djm@cvs.openbsd.org 2012/01/05 00:16:56
[monitor.c]
memleak on error path
- djm@cvs.openbsd.org 2012/01/07 21:11:36
[mux.c]
fix double-free in new session handler
20120206
- (djm) [ssh-keygen.c] Don't fail in do_gen_all_hostkeys on platforms

6
mux.c
View File

@ -1,4 +1,4 @@
/* $OpenBSD: mux.c,v 1.33 2011/12/04 23:16:12 djm Exp $ */
/* $OpenBSD: mux.c,v 1.34 2012/01/07 21:11:36 djm Exp $ */
/*
* Copyright (c) 2002-2008 Damien Miller <djm@openbsd.org>
*
@ -341,10 +341,8 @@ process_mux_new_session(u_int rid, Channel *c, Buffer *m, Buffer *r)
env_len = 0;
while (buffer_len(m) > 0) {
#define MUX_MAX_ENV_VARS 4096
if ((cp = buffer_get_string_ret(m, &len)) == NULL) {
xfree(cmd);
if ((cp = buffer_get_string_ret(m, &len)) == NULL)
goto malf;
}
if (!env_permitted(cp)) {
xfree(cp);
continue;