Fix crash with -R forwarding

This commit is contained in:
Matt Johnston 2011-11-06 20:22:34 +08:00
parent d4e7654ed0
commit 59943acffe

View File

@ -82,6 +82,9 @@ static void tcp_acceptor(struct Listener *listener, int sock) {
port = tcpinfo->listenport;
}
if (addr == NULL) {
addr = "localhost";
}
buf_putstring(ses.writepayload, addr, strlen(addr));
buf_putint(ses.writepayload, port);