mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-06 17:20:22 +00:00
transport: prevent git_remote_download() from segfaulting when being passed a lightweight remote built with git_remote_new()
This commit is contained in:
parent
1744fafec0
commit
c3ec2ec262
@ -57,7 +57,7 @@ const char *git_refspec_dst(const git_refspec *refspec)
|
||||
|
||||
int git_refspec_src_match(const git_refspec *refspec, const char *refname)
|
||||
{
|
||||
return refspec == NULL ? GIT_ENOMATCH : git__fnmatch(refspec->src, refname, 0);
|
||||
return (refspec == NULL || refspec->src == NULL) ? GIT_ENOMATCH : git__fnmatch(refspec->src, refname, 0);
|
||||
}
|
||||
|
||||
int git_refspec_transform(char *out, size_t outlen, const git_refspec *spec, const char *name)
|
||||
|
Loading…
Reference in New Issue
Block a user