mirror of
https://git.proxmox.com/git/libgit2
synced 2025-08-04 09:18:48 +00:00
Add detection of incorrect usage to git__joinpath()
This commit is contained in:
parent
f428ae615b
commit
2b861d7589
@ -223,6 +223,9 @@ void git__joinpath_n(char *buffer_out, int count, ...)
|
||||
int len;
|
||||
|
||||
path = va_arg(ap, const char *);
|
||||
|
||||
assert((i == 0) || path != buffer_start);
|
||||
|
||||
if (i > 0 && *path == '/' && buffer_out > buffer_start && buffer_out[-1] == '/')
|
||||
path++;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user