summaryrefslogtreecommitdiff
path: root/src/merge.c
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@microsoft.com>2013-12-12 17:40:40 -0500
committerEdward Thomson <ethomson@microsoft.com>2013-12-12 17:40:40 -0500
commit86a05ef382438b22d2ffaaa1a77814781243bc80 (patch)
treee8e75570944a76fc1d5fca907ccc924f8e7db0a3 /src/merge.c
parent0eedacb06ae07fd0d784066ad41383276e05d92e (diff)
downloadlibgit2-86a05ef382438b22d2ffaaa1a77814781243bc80.tar.gz
Validate struct versions in merge, revert
Diffstat (limited to 'src/merge.c')
-rw-r--r--src/merge.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/merge.c b/src/merge.c
index 45387d4ad..00415cbc0 100644
--- a/src/merge.c
+++ b/src/merge.c
@@ -1575,6 +1575,8 @@ int git_merge_trees(
*out = NULL;
+ GITERR_CHECK_VERSION(given_opts, GIT_MERGE_TREE_OPTS_VERSION, "git_merge_tree_opts");
+
if ((error = merge_tree_normalize_opts(repo, &opts, given_opts)) < 0)
return error;
@@ -2427,6 +2429,8 @@ int git_merge(
*out = NULL;
+ GITERR_CHECK_VERSION(given_opts, GIT_MERGE_OPTS_VERSION, "git_merge_opts");
+
if (their_heads_len != 1) {
giterr_set(GITERR_MERGE, "Can only merge a single branch");
return -1;