dc: fix "dc does_not_exist" SEGVing
[oweals/busybox.git] / miscutils / crontab.c
index 23cb54887b73d4239a71258417250843314c8311..4787fa08f5dee66b84fac6e2eece54e3ed5cfac2 100644 (file)
@@ -15,7 +15,7 @@
 //config:      help
 //config:      Crontab manipulates the crontab for a particular user. Only
 //config:      the superuser may specify a different user and/or crontab directory.
-//config:      Note that Busybox binary must be setuid root for this applet to
+//config:      Note that busybox binary must be setuid root for this applet to
 //config:      work properly.
 
 /* Needs to be run by root or be suid root - needs to change /var/spool/cron* files: */
@@ -99,8 +99,9 @@ int crontab_main(int argc UNUSED_PARAM, char **argv)
                OPT_ler = OPT_l + OPT_e + OPT_r,
        };
 
-       opt_complementary = "?1:dr"; /* max one argument; -d implies -r */
-       opt_ler = getopt32(argv, "u:c:lerd", &user_name, &crontab_dir);
+       opt_ler = getopt32(argv, "^" "u:c:lerd" "\0" "?1:dr"/*max one arg; -d implies -r*/,
+                               &user_name, &crontab_dir
+       );
        argv += optind;
 
        if (sanitize_env_if_suid()) { /* Clears dangerous stuff, sets PATH */