summaryrefslogtreecommitdiff
path: root/usr.bin/ssh/mux.c
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2015-08-19 23:18:27 +0000
committerDamien Miller <djm@cvs.openbsd.org>2015-08-19 23:18:27 +0000
commit257cb8398a180ee1e5be10c446ccadd47ec594ab (patch)
tree874266aa2670828198fa4c864070c28b8fad6619 /usr.bin/ssh/mux.c
parent1ed52a11356b4793036931f18e48556ea50405cf (diff)
fix free() of uninitialised pointer reported by Mateusz Kocielski;
ok markus@
Diffstat (limited to 'usr.bin/ssh/mux.c')
-rw-r--r--usr.bin/ssh/mux.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.bin/ssh/mux.c b/usr.bin/ssh/mux.c
index 961f7246afe..758956375a1 100644
--- a/usr.bin/ssh/mux.c
+++ b/usr.bin/ssh/mux.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mux.c,v 1.53 2015/05/01 04:03:20 djm Exp $ */
+/* $OpenBSD: mux.c,v 1.54 2015/08/19 23:18:26 djm Exp $ */
/*
* Copyright (c) 2002-2008 Damien Miller <djm@openbsd.org>
*
@@ -652,6 +652,8 @@ process_mux_open_fwd(u_int rid, Channel *c, Buffer *m, Buffer *r)
u_int lport, cport;
int i, ret = 0, freefwd = 1;
+ memset(&fwd, 0, sizeof(fwd));
+
/* XXX - lport/cport check redundant */
if (buffer_get_int_ret(&ftype, m) != 0 ||
(listen_addr = buffer_get_string_ret(m, NULL)) == NULL ||
@@ -819,6 +821,8 @@ process_mux_close_fwd(u_int rid, Channel *c, Buffer *m, Buffer *r)
int i, ret = 0;
u_int lport, cport;
+ memset(&fwd, 0, sizeof(fwd));
+
if (buffer_get_int_ret(&ftype, m) != 0 ||
(listen_addr = buffer_get_string_ret(m, NULL)) == NULL ||
buffer_get_int_ret(&lport, m) != 0 ||