summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2019-05-20 06:46:10 -0700
committerEdward Thomson <ethomson@edwardthomson.com>2019-06-24 15:00:40 +0100
commit9a6992c48bf08755606d865ba2b3504438789b73 (patch)
tree17ef9121eb3a9fe1f9107d8a2a019174e32312c1
parentb205f5386aafd9236d13ecf124044fa89a3fd349 (diff)
downloadlibgit2-9a6992c48bf08755606d865ba2b3504438789b73.tar.gz
merge: safely cast size of merged file for index
Explicitly truncate the file size to a `uint32_t`.
-rw-r--r--src/merge.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/merge.c b/src/merge.c
index ec34ccbaf..c1f1cc46a 100644
--- a/src/merge.c
+++ b/src/merge.c
@@ -867,7 +867,7 @@ static int merge_conflict_invoke_driver(
git_oid_cpy(&result->id, &oid);
result->mode = mode;
- result->file_size = buf.size;
+ result->file_size = (uint32_t)buf.size;
result->path = git_pool_strdup(&diff_list->pool, path);
GIT_ERROR_CHECK_ALLOC(result->path);