diff options
Diffstat (limited to 'builtin-apply.c')
-rw-r--r-- | builtin-apply.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin-apply.c b/builtin-apply.c index 38f647510a..dfa1716796 100644 --- a/builtin-apply.c +++ b/builtin-apply.c @@ -1981,7 +1981,7 @@ static int apply_data(struct patch *patch, struct stat *st, struct cache_entry * } } else if (patch->old_name) { - size = st->st_size; + size = xsize_t(st->st_size); alloc = size + 8192; buf = xmalloc(alloc); if (read_old_data(st, patch->old_name, &buf, &alloc, &size)) @@ -2359,7 +2359,7 @@ static int try_create_file(const char *path, unsigned int mode, const char *buf, char *nbuf; unsigned long nsize; - if (S_ISLNK(mode)) + if (has_symlinks && S_ISLNK(mode)) /* Although buf:size is counted string, it also is NUL * terminated. */ |