X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=builtin-apply.c;h=dfa17167963d1318298208e880be1cae47d06ea9;hb=e286114d0edbed846149227d48f75338fea760e5;hp=38f647510a13f51e63a35aaf442aeb154e34915c;hpb=784b11cd05e7862b0fbcc1251a65669c7004a8df;p=git.git diff --git a/builtin-apply.c b/builtin-apply.c index 38f647510..dfa171679 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. */