mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-08 06:15:02 +00:00
describe: Do not crash if pass null option to git_describe_commit()
This commit is contained in:
parent
fd0f6d3855
commit
0494a7c9a9
@ -665,7 +665,6 @@ int git_describe_commit(
|
||||
GITERR_CHECK_ALLOC(data.result);
|
||||
data.result->repo = git_object_owner(committish);
|
||||
|
||||
data.opts = opts;
|
||||
data.repo = git_object_owner(committish);
|
||||
|
||||
if ((error = normalize_options(&normalized, opts)) < 0)
|
||||
@ -675,6 +674,7 @@ int git_describe_commit(
|
||||
&normalized,
|
||||
GIT_DESCRIBE_OPTIONS_VERSION,
|
||||
"git_describe_options");
|
||||
data.opts = &normalized;
|
||||
|
||||
data.names = git_oidmap_alloc();
|
||||
GITERR_CHECK_ALLOC(data.names);
|
||||
|
Loading…
Reference in New Issue
Block a user