diff options
author | Jim Meyering <jim@meyering.net> | 2000-06-21 07:29:03 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2000-06-21 07:29:03 +0000 |
commit | e1e0683c8209f04f51a72957a11b2b203506614a (patch) | |
tree | 168f1aaf0d11316256f21f4f9c7f8d37eb902784 | |
parent | 4be8db746e1e8090834c68c4879fea10c104966d (diff) | |
download | coreutils-e1e0683c8209f04f51a72957a11b2b203506614a.tar.xz |
(valid_options): Don't segfault on `stty erase -'.
-rw-r--r-- | src/stty.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/stty.c b/src/stty.c index 3bbf0a6f1..c26374717 100644 --- a/src/stty.c +++ b/src/stty.c @@ -680,7 +680,7 @@ valid_options (char *opt, const char *valid_opts, { char ch; - if (*opt++ != '-') + if (*opt++ != '-' || *opt == 0) return 0; while ((ch = *opt)) |