]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
scriptreplay: bug in argument check
authorSami Kerola <kerolasa@iki.fi>
Sun, 20 Feb 2011 12:21:17 +0000 (13:21 +0100)
committerKarel Zak <kzak@redhat.com>
Mon, 21 Feb 2011 15:54:48 +0000 (16:54 +0100)
Number of arguments cannot be at the same time too many and few.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
misc-utils/scriptreplay.c

index f8ee9e011c350f618e7f237a0a9a9d56b6374d29..992e949f90e82dc2b614d2320b9439fcd407871e 100644 (file)
@@ -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];