summaryrefslogtreecommitdiff
path: root/src/transports/ssh.c
diff options
context:
space:
mode:
authorIsaac Kearse <isaac@kearse.co.nz>2013-09-10 05:16:52 +1200
committerIsaac Kearse <isaac@kearse.co.nz>2013-09-10 05:16:52 +1200
commitb345026baaed21ffe8d325f784e597cf6bb779a6 (patch)
tree6585bb157f158a21e55552f211d651a10e2b15de /src/transports/ssh.c
parentfbabe855ad6f9a7b2a50a54d0d826d2e65538154 (diff)
downloadlibgit2-b345026baaed21ffe8d325f784e597cf6bb779a6.tar.gz
Test for repo before removing leading colon
Diffstat (limited to 'src/transports/ssh.c')
-rw-r--r--src/transports/ssh.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/transports/ssh.c b/src/transports/ssh.c
index 47ea5ccf7..bf62bd185 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) {