# HG changeset patch # User Matt Johnston # Date 1320582154 -28800 # Node ID abf040aedd44c1f81d07430846fd4765ca106313 # Parent af304deacb4ca920dc8cd9b6088c04a947285015 Fix crash with -R forwarding diff -r af304deacb4c -r abf040aedd44 tcp-accept.c --- 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);