mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-05 13:48:41 +00:00
transport-git: fix git request length calculation
There was an off-by-one error that was uncovered when we used the right length from git_buf. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
This commit is contained in:
parent
dfd0abda4d
commit
7ad994bb60
@ -56,7 +56,7 @@ static int gen_proto(git_buf *request, const char *cmd, const char *url)
|
||||
if (cmd == NULL)
|
||||
cmd = default_command;
|
||||
|
||||
len = 4 + strlen(cmd) + 1 + strlen(repo) + 1 + strlen(host) + (delim - url) + 1 + 1;
|
||||
len = 4 + strlen(cmd) + 1 + strlen(repo) + 1 + strlen(host) + (delim - url) + 1;
|
||||
|
||||
git_buf_grow(request, len);
|
||||
git_buf_printf(request, "%04x%s %s%c%s", len, cmd, repo, 0, host);
|
||||
|
Loading…
Reference in New Issue
Block a user