X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/c2ec50a1445d17b65900427ad63f6ff8692aa386..f160b7b8908cac4a7ca37b49928b7855fe0a11fe:/x11fwd.c diff --git a/x11fwd.c b/x11fwd.c index 6e04abe1..4621ac9b 100644 --- a/x11fwd.c +++ b/x11fwd.c @@ -301,9 +301,9 @@ const char *x11_init(Socket * s, char *display, void *c, void *auth, host[n] = '\0'; sfree(display); - if(!strcmp(host, "unix")) { + if(!strcmp(host, "unix") || host[0] == '/') { /* use AF_UNIX sockets (doesn't make sense on all platforms) */ - addr = platform_get_x11_unix_address(displaynum, + addr = platform_get_x11_unix_address(display, displaynum, &dummy_realhost); port = 0; /* to show we are not confused */ } else { @@ -485,7 +485,7 @@ int x11_send(Socket s, char *data, int len) char realauthdata[64]; int realauthlen = 0; int authstrlen = strlen(x11_authnames[pr->auth->realproto]); - int buflen; + int buflen = 0; /* initialise to placate optimiser */ static const char zeroes[4] = { 0,0,0,0 }; void *buf;