aboutsummaryrefslogtreecommitdiff
path: root/coreutils/cp.c
diff options
context:
space:
mode:
Diffstat (limited to 'coreutils/cp.c')
-rw-r--r--coreutils/cp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/coreutils/cp.c b/coreutils/cp.c
index b7f0e290f..50ca1ccea 100644
--- a/coreutils/cp.c
+++ b/coreutils/cp.c
@@ -252,7 +252,7 @@ int cp_main(int argc, char **argv)
252 } 252 }
253 } 253 }
254 } 254 }
255 /* else: last is DIR from "t -DIR" */ 255 /* else: last is DIR from "-t DIR" */
256 256
257 while (1) { 257 while (1) {
258#if ENABLE_FEATURE_CP_LONG_OPTIONS 258#if ENABLE_FEATURE_CP_LONG_OPTIONS
@@ -274,7 +274,7 @@ int cp_main(int argc, char **argv)
274 if (copy_file(*argv, dest, flags) < 0) { 274 if (copy_file(*argv, dest, flags) < 0) {
275 status = EXIT_FAILURE; 275 status = EXIT_FAILURE;
276 } 276 }
277 if (*++argv == last) { 277 if (!*++argv || *argv == last) {
278 /* possibly leaking dest... */ 278 /* possibly leaking dest... */
279 break; 279 break;
280 } 280 }