[PATCH 5/5] scriptreplay: bug in argument check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Number of arguments cannot be at the same time too many and few.

Signed-off-by: Sami Kerola <kerolasa@xxxxxx>
---
 misc-utils/scriptreplay.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/misc-utils/scriptreplay.c b/misc-utils/scriptreplay.c
index f8ee9e0..992e949 100644
--- a/misc-utils/scriptreplay.c
+++ b/misc-utils/scriptreplay.c
@@ -133,7 +133,7 @@ main(int argc, char *argv[])
 	bindtextdomain(PACKAGE, LOCALEDIR);
 	textdomain(PACKAGE);
 
-	if (argc < 2 && argc > 4)
+	if (argc < 2 || 4  < argc)
 		usage(EXIT_FAILURE);
 
 	tname = argv[1];
-- 
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux