fix segfault if user only specifies 1 file
authorMike Frysinger <vapier@gentoo.org>
Thu, 12 May 2005 22:36:32 +0000 (22:36 -0000)
committerMike Frysinger <vapier@gentoo.org>
Thu, 12 May 2005 22:36:32 +0000 (22:36 -0000)
coreutils/comm.c

index 6b7b9554c4b8ac5ef4353e7018a6fb6eb8d687d0..f390490e2a45a51eee4a64c213cb8f9cb9fa0126 100644 (file)
@@ -142,7 +142,7 @@ int comm_main (int argc, char **argv)
 
        opt = bb_getopt_ulflags(argc, argv, "123");
 
-       if ((opt & 0x80000000UL) || (optind == argc))
+       if (optind != argc + 2)
                bb_show_usage();
 
        if (opt & COMM_OPT_1)