aboutsummaryrefslogtreecommitdiff
path: root/toys/posix/cp.c
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2014-12-31 21:23:37 -0600
committerRob Landley <rob@landley.net>2014-12-31 21:23:37 -0600
commit5834ddd6df659d9c9dc7333284fc86762dea061a (patch)
treeb1cb0202dbfe44fd3b2cbead367136aaa69b5d41 /toys/posix/cp.c
parentde699accf6804e8b1d8042b46c85500ee8c672c6 (diff)
downloadtoybox-5834ddd6df659d9c9dc7333284fc86762dea061a.tar.gz
When CP_MORE was disabled, the d flag was still in the [-exclusion] list at the end and option parsing fell off the end looking for it (segfault) if DEBUG wasn't enabled to check for that.
Diffstat (limited to 'toys/posix/cp.c')
-rw-r--r--toys/posix/cp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/toys/posix/cp.c b/toys/posix/cp.c
index e83dabae..c1a438f9 100644
--- a/toys/posix/cp.c
+++ b/toys/posix/cp.c
@@ -7,7 +7,7 @@
// This is subtle: MV options shared with CP must be in same order (right to
// left) as CP for FLAG_X macros to work out right.
-USE_CP(NEWTOY(cp, "<2RHLPp"USE_CP_MORE("rdaslvnF")"fi[-HLPd]"USE_CP_MORE("[-ni]"), TOYFLAG_BIN))
+USE_CP(NEWTOY(cp, "<2RHLPp"USE_CP_MORE("rdaslvnF")"fi[-HLP"USE_CP_MORE("d")"]"USE_CP_MORE("[-ni]"), TOYFLAG_BIN))
USE_MV(NEWTOY(mv, "<2"USE_CP_MORE("vnF")"fi"USE_CP_MORE("[-ni]"), TOYFLAG_BIN))
USE_INSTALL(NEWTOY(install, "<1cdDpsvm:o:g:", TOYFLAG_USR|TOYFLAG_BIN))
*