aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chmod_chown_chgrp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/chmod_chown_chgrp.c b/chmod_chown_chgrp.c
index c782eb3c4..c0e380a8e 100644
--- a/chmod_chown_chgrp.c
+++ b/chmod_chown_chgrp.c
@@ -118,7 +118,7 @@ int chmod_chown_chgrp_main(int argc, char **argv)
argv++;
/* Parse options */
- while (**argv == '-') {
+ while (argc && (**argv == '-')) {
while (*++(*argv))
switch (**argv) {
case 'R':