diff tcp-accept.c @ 632:abf040aedd44

Fix crash with -R forwarding
author Matt Johnston <matt@ucc.asn.au>
date Sun, 06 Nov 2011 20:22:34 +0800
parents d2daeb015138
children dfdb9d9189ff
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);