diff options
author | 2015-04-15 23:23:25 +0000 | |
---|---|---|
committer | 2015-04-15 23:23:25 +0000 | |
commit | 5e6098f0c36cb3666513aa2421fea18e798cacb9 (patch) | |
tree | 80fe14ae4d24c509c4cd5bf14df3f91c44185270 | |
parent | Fix some issues in bright colour handling. Bold background doesn't exist (diff) | |
download | wireguard-openbsd-5e6098f0c36cb3666513aa2421fea18e798cacb9.tar.xz wireguard-openbsd-5e6098f0c36cb3666513aa2421fea18e798cacb9.zip |
Plug leak of address passed to logging. bz#2373, patch from jjelen at redhat,
ok markus@
-rw-r--r-- | usr.bin/ssh/sshd.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.bin/ssh/sshd.c b/usr.bin/ssh/sshd.c index 008025f7968..082b5ec5579 100644 --- a/usr.bin/ssh/sshd.c +++ b/usr.bin/ssh/sshd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshd.c,v 1.446 2015/04/10 05:16:50 dtucker Exp $ */ +/* $OpenBSD: sshd.c,v 1.447 2015/04/15 23:23:25 dtucker Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -1389,7 +1389,7 @@ main(int ac, char **av) int sock_in = -1, sock_out = -1, newsock = -1; const char *remote_ip; int remote_port; - char *fp, *line, *logfile = NULL; + char *fp, *line, *laddr, *logfile = NULL; int config_s[2] = { -1 , -1 }; u_int n; u_int64_t ibytes, obytes; @@ -1986,9 +1986,10 @@ main(int ac, char **av) remote_ip = get_remote_ipaddr(); /* Log the connection. */ + laddr = get_local_ipaddr(sock_in); verbose("Connection from %s port %d on %s port %d", - remote_ip, remote_port, - get_local_ipaddr(sock_in), get_local_port()); + remote_ip, remote_port, laddr, get_local_port()); + free(laddr); /* * We don't want to listen forever unless the other side |