diff options
author | nulltoken <emeric.fermas@gmail.com> | 2013-05-05 16:45:38 +0200 |
---|---|---|
committer | nulltoken <emeric.fermas@gmail.com> | 2013-05-05 16:47:07 +0200 |
commit | ce72e399d26a7b246f6425657b0c8a55d40159c9 (patch) | |
tree | fa7a94be446772af0a054dc823d3e5d5980d0892 /src/commit.c | |
parent | dfec726bbae0e699b78db8f1b63372134c8467a6 (diff) | |
download | libgit2-ce72e399d26a7b246f6425657b0c8a55d40159c9.tar.gz |
commit: guard create() against not owned trees
Diffstat (limited to 'src/commit.c')
-rw-r--r-- | src/commit.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/commit.c b/src/commit.c index 46c02c292..aec3e1e63 100644 --- a/src/commit.c +++ b/src/commit.c @@ -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); |