From: Jim Meyering Date: Sat, 25 Aug 2001 15:09:31 +0000 (+0000) Subject: (main): Fix a typo in the previous patch: missing X-Git-Tag: TEXTUTILS-2_0_15~323 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=598382f21600159f5896155877a2f2e04effb0bf;p=thirdparty%2Fcoreutils.git (main): Fix a typo in the previous patch: missing a bounds check for examples like `uniq a b c'. --- diff --git a/src/uniq.c b/src/uniq.c index 36119cff82..fc2b19a82c 100644 --- a/src/uniq.c +++ b/src/uniq.c @@ -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)