mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-09 05:28:34 +00:00
commit: guard create() against not owned trees
This commit is contained in:
parent
dfec726bba
commit
ce72e399d2
@ -149,6 +149,7 @@ int git_commit_create(
|
||||
const git_oid **parent_oids;
|
||||
|
||||
assert(parent_count >= 0);
|
||||
assert(git_object_owner((const git_object *)tree) == repo);
|
||||
|
||||
parent_oids = git__malloc(parent_count * sizeof(git_oid *));
|
||||
GITERR_CHECK_ALLOC(parent_oids);
|
||||
|
Loading…
Reference in New Issue
Block a user