From ce72e399d26a7b246f6425657b0c8a55d40159c9 Mon Sep 17 00:00:00 2001 From: nulltoken Date: Sun, 5 May 2013 16:45:38 +0200 Subject: [PATCH] commit: guard create() against not owned trees --- src/commit.c | 1 + 1 file changed, 1 insertion(+) 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);