diff options
Diffstat (limited to 'bin/stty/stty.c')
| -rw-r--r-- | bin/stty/stty.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/stty/stty.c b/bin/stty/stty.c index 99765e386f61..4b19b64d7f4a 100644 --- a/bin/stty/stty.c +++ b/bin/stty/stty.c @@ -66,7 +66,8 @@ main(argc, argv) i.fd = STDIN_FILENO; opterr = 0; - while (strspn(argv[optind], "-aefg") == strlen(argv[optind]) && + while (argv[optind] && + strspn(argv[optind], "-aefg") == strlen(argv[optind]) && (ch = getopt(argc, argv, "aef:g")) != EOF) switch(ch) { case 'a': /* undocumented: POSIX compatibility */ |
