changeset 632:abf040aedd44

Fix crash with -R forwarding
author Matt Johnston <matt@ucc.asn.au>
date Sun, 06 Nov 2011 20:22:34 +0800
parents af304deacb4c
children cf5a167776c3
files tcp-accept.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/tcp-accept.c	Sat Nov 05 23:12:15 2011 +0800
+++ b/tcp-accept.c	Sun Nov 06 20:22:34 2011 +0800
@@ -82,6 +82,9 @@
 			port = tcpinfo->listenport;
 		}
 
+		if (addr == NULL) {
+			addr = "localhost";
+		}
 		buf_putstring(ses.writepayload, addr, strlen(addr));
 		buf_putint(ses.writepayload, port);