]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(main): Fix a typo in the previous patch: missing
authorJim Meyering <jim@meyering.net>
Sat, 25 Aug 2001 15:09:31 +0000 (15:09 +0000)
committerJim Meyering <jim@meyering.net>
Sat, 25 Aug 2001 15:09:31 +0000 (15:09 +0000)
a bounds check for examples like `uniq a b c'.

src/uniq.c

index 36119cff82d252fefe1093e6070035fb09fb81ed..fc2b19a82c5a7fcc00e07d367db6269b2d7a11f3 100644 (file)
@@ -413,6 +413,11 @@ main (int argc, char **argv)
        {
          if (optind == argc)
            break;
+         if (nfiles == 2)
+           {
+             error (0, 0, _("extra operand `%s'"), argv[optind]);
+             usage (1);
+           }
          file[nfiles++] = argv[optind++];
        }
       else switch (optc)