We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 36e5db5 commit fd096f5Copy full SHA for fd096f5
contrib/win32/win32compat/w32fd.c
@@ -326,7 +326,11 @@ w32_afunix_socket(struct sockaddr_un* addr)
326
a AF_UNIX socket if ssh forwarding is enabled. If the addr->sun_path is the
327
the well known named pipe, we open the socket with w32_fileio.
328
*/
329
- if(strcmp(addr->sun_path, "\\\\.\\pipe\\openssh-ssh-agent") == 0)
+ int len = wcslen(AGENT_PIPE_ID);
330
+ char* pipeid = (char*)malloc(len + 1);
331
+ memset(pipeid, 0, len + 1);
332
+
333
+ if(wcstombs(pipeid, AGENT_PIPE_ID, len + 1) != (size_t) -1 && strcmp(addr->sun_path, pipeid) == 0)
334
return w32_fileio_socket(SOCK_STREAM, 0);
335
else
336
return w32_unix_socket(SOCK_STREAM, 0);
0 commit comments