From: Eric Andersen Date: Tue, 5 Sep 2000 18:21:53 +0000 (-0000) Subject: Apply segfault on no-args fix from robotti@metconnect.com X-Git-Tag: 0_47~115 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=1eec89df4c85f6c6fbf8fea962cd5b1d8029492d;p=oweals%2Fbusybox.git Apply segfault on no-args fix from robotti@metconnect.com --- diff --git a/miscutils/mt.c b/miscutils/mt.c index 087819e72..e77f58a6a 100644 --- a/miscutils/mt.c +++ b/miscutils/mt.c @@ -55,7 +55,7 @@ extern int mt_main(int argc, char **argv) struct mtop op; int fd; - if ((argc != 2 && argc != 3) && **(argv + 1) != '-') { + if (argc < 2) { usage(mt_usage); } diff --git a/mt.c b/mt.c index 087819e72..e77f58a6a 100644 --- a/mt.c +++ b/mt.c @@ -55,7 +55,7 @@ extern int mt_main(int argc, char **argv) struct mtop op; int fd; - if ((argc != 2 && argc != 3) && **(argv + 1) != '-') { + if (argc < 2) { usage(mt_usage); }