X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/1da05366adf3029d2c730eed6a449c75676dd957..b31c92edcc11995daa5c90ec280010a1e2c5b64d:/socket.c diff --git a/socket.c b/socket.c index 4e6ef60f..c6341ced 100644 --- a/socket.c +++ b/socket.c @@ -198,7 +198,7 @@ int open_socket_out(char *host, int port, const char *bind_address, strlcpy(buffer, h, sizeof buffer); /* Is the USER:PASS@ prefix present? */ - if ((cp = strchr(buffer, '@')) != NULL) { + if ((cp = strrchr(buffer, '@')) != NULL) { *cp++ = '\0'; /* The remainder is the HOST:PORT part. */ h = cp;