Commit b345026baaed21ffe8d325f784e597cf6bb779a6

Isaac Kearse 2013-09-10T05:16:52

Test for repo before removing leading colon

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/transports/ssh.c b/src/transports/ssh.c
index 47ea5cc..bf62bd1 100644
--- a/src/transports/ssh.c
+++ b/src/transports/ssh.c
@@ -51,7 +51,7 @@ static int gen_proto(git_buf *request, const char *cmd, const char *url)
 		repo = strchr(url, '/');
 	} else {
 		repo = strchr(url, ':');
-		repo++;
+		if (repo) repo++;
 	}
 
 	if (!repo) {