# HG changeset patch # User Rob Landley # Date 1420082617 21600 # Node ID 556d8cbfeb087d69e1858813de81771f1e787a1f # Parent aafd2f28245aa3186e45447ab770a692b145cf95 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. diff -r aafd2f28245a -r 556d8cbfeb08 toys/posix/cp.c --- a/toys/posix/cp.c Wed Dec 31 16:22:31 2014 -0600 +++ b/toys/posix/cp.c Wed Dec 31 21:23:37 2014 -0600 @@ -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)) *