From 20905f2c93b659dc8908044132b8336439d8e8ee Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Wed, 13 Oct 1993 22:30:38 +0000 Subject: merge with 3.8.4e --- src/cp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/cp.c') diff --git a/src/cp.c b/src/cp.c index 5d88f99aa..4fca2c3f9 100644 --- a/src/cp.c +++ b/src/cp.c @@ -565,7 +565,8 @@ copy (src_path, dst_path, new_dst, device, ancestors) if (eaccess_stat (&dst_sb, W_OK) != 0) fprintf (stderr, "%s: overwrite `%s', overriding mode %04o? ", - program_name, dst_path, dst_sb.st_mode & 07777); + program_name, dst_path, + (unsigned int) (dst_sb.st_mode & 07777)); else fprintf (stderr, "%s: overwrite `%s'? ", program_name, dst_path); @@ -765,7 +766,7 @@ copy (src_path, dst_path, new_dst, device, ancestors) int link_size; link_val = (char *) alloca (PATH_MAX + 2); - link_size = readlink (src_path, link_val, sizeof (link_val) - 1); + link_size = readlink (src_path, link_val, PATH_MAX + 1); if (link_size < 0) { error (0, errno, "cannot read symbolic link `%s'", src_path); -- cgit v1.2.3-70-g09d2