diff options
author | Steven King Jr <stevek@axosoft.com> | 2018-02-28 12:59:47 -0700 |
---|---|---|
committer | Edward Thomson <ethomson@edwardthomson.com> | 2018-03-19 16:08:01 -0700 |
commit | 16210877c97431af23f1b9549d997b406c6e9116 (patch) | |
tree | f23275aa143ae58beb13979942e3196c08698c71 | |
parent | 8a2cdbd31015ad89ba24cfa36262436cdf2971a3 (diff) | |
download | libgit2-16210877c97431af23f1b9549d997b406c6e9116.tar.gz |
Unescape repo before constructing ssh request
-rw-r--r-- | src/transports/ssh.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/transports/ssh.c b/src/transports/ssh.c index 2ba91b74d..42f9bff6f 100644 --- a/src/transports/ssh.c +++ b/src/transports/ssh.c @@ -89,15 +89,19 @@ done: return -1; } + repo = gitno_unescape(git__strdup(repo)); + len = strlen(cmd) + 1 /* Space */ + 1 /* Quote */ + strlen(repo) + 1 /* Quote */ + 1; git_buf_grow(request, len); git_buf_printf(request, "%s '%s'", cmd, repo); git_buf_putc(request, '\0'); + git__free(repo); + if (git_buf_oom(request)) return -1; - + return 0; } |