diff options
author | Edward Thomson <ethomson@edwardthomson.com> | 2019-05-20 06:46:10 -0700 |
---|---|---|
committer | Edward Thomson <ethomson@edwardthomson.com> | 2019-06-24 15:00:40 +0100 |
commit | 9a6992c48bf08755606d865ba2b3504438789b73 (patch) | |
tree | 17ef9121eb3a9fe1f9107d8a2a019174e32312c1 | |
parent | b205f5386aafd9236d13ecf124044fa89a3fd349 (diff) | |
download | libgit2-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.c | 2 |
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); |