diff options
author | Eric Andersen <andersen@codepoet.org> | 2000-06-02 17:51:39 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2000-06-02 17:51:39 +0000 |
commit | 9c8ffa02f4ecd6029233de9d5cdc695fc82fc6df (patch) | |
tree | efb6f856f25a646c4fef50123de1deb559d83a9a | |
parent | 3199bda52e85225c22c617617f43591d6fd23eea (diff) | |
download | busybox-w32-9c8ffa02f4ecd6029233de9d5cdc695fc82fc6df.tar.gz busybox-w32-9c8ffa02f4ecd6029233de9d5cdc695fc82fc6df.tar.bz2 busybox-w32-9c8ffa02f4ecd6029233de9d5cdc695fc82fc6df.zip |
Pavel fixed a segfault in yes.
-Erik
-rw-r--r-- | Changelog | 1 | ||||
-rw-r--r-- | coreutils/yes.c | 2 | ||||
-rw-r--r-- | yes.c | 2 |
3 files changed, 3 insertions, 2 deletions
@@ -48,6 +48,7 @@ | |||
48 | * Fixed more and ps to have sensible terminal width defaults, thanks | 48 | * Fixed more and ps to have sensible terminal width defaults, thanks |
49 | to Pavel Roskin. | 49 | to Pavel Roskin. |
50 | * Fixed all fatalError() calls lacking a "\n", thanks to Pavel Roskin. | 50 | * Fixed all fatalError() calls lacking a "\n", thanks to Pavel Roskin. |
51 | * Fixed a segfault in yes when no args were given -- Pavel Roskin. | ||
51 | * More doc updates | 52 | * More doc updates |
52 | 53 | ||
53 | 54 | ||
diff --git a/coreutils/yes.c b/coreutils/yes.c index 97b6f653c..1718af4bb 100644 --- a/coreutils/yes.c +++ b/coreutils/yes.c | |||
@@ -27,7 +27,7 @@ extern int yes_main(int argc, char **argv) | |||
27 | { | 27 | { |
28 | int i; | 28 | int i; |
29 | 29 | ||
30 | if (argc >=1 && *argv[1]=='-') { | 30 | if (argc >= 2 && *argv[1] == '-') { |
31 | usage("yes [OPTION]... [STRING]...\n" | 31 | usage("yes [OPTION]... [STRING]...\n" |
32 | #ifndef BB_FEATURE_TRIVIAL_HELP | 32 | #ifndef BB_FEATURE_TRIVIAL_HELP |
33 | "\nRepeatedly outputs a line with all specified STRING(s), or `y'.\n" | 33 | "\nRepeatedly outputs a line with all specified STRING(s), or `y'.\n" |
@@ -27,7 +27,7 @@ extern int yes_main(int argc, char **argv) | |||
27 | { | 27 | { |
28 | int i; | 28 | int i; |
29 | 29 | ||
30 | if (argc >=1 && *argv[1]=='-') { | 30 | if (argc >= 2 && *argv[1] == '-') { |
31 | usage("yes [OPTION]... [STRING]...\n" | 31 | usage("yes [OPTION]... [STRING]...\n" |
32 | #ifndef BB_FEATURE_TRIVIAL_HELP | 32 | #ifndef BB_FEATURE_TRIVIAL_HELP |
33 | "\nRepeatedly outputs a line with all specified STRING(s), or `y'.\n" | 33 | "\nRepeatedly outputs a line with all specified STRING(s), or `y'.\n" |