In the host:/path notation require 'host' to be at least 2 chars long.

This is necessary to distinguish the notation from the DOS-style
C:/path notation with a drive letter.
This commit is contained in:
Johannes Sixt
2007-01-22 14:19:23 +01:00
parent 306e27d8ee
commit 562cd8385d

View File

@@ -680,7 +680,8 @@ pid_t git_connect(int fd[2], char *url, const char *prog)
path = strchr(end, c);
if (c == ':') {
if (path) {
/* host must have at least 2 chars to catch DOS C:/path */
if (path && path - end > 1) {
protocol = PROTO_SSH;
*path++ = '\0';
} else