Fixed segfault when you type "chmod -R". "chown -R" and "chgrp -R" are still
authorMark Whitley <markw@lineo.com>
Tue, 6 Jun 2000 17:40:32 +0000 (17:40 -0000)
committerMark Whitley <markw@lineo.com>
Tue, 6 Jun 2000 17:40:32 +0000 (17:40 -0000)
having problems...

chmod_chown_chgrp.c

index c782eb3c4c52aab60f1ea9ec34ba0fe0df69c8d2..c0e380a8ebc7451e5ed1ad19e10167babf60e94f 100644 (file)
@@ -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':