diff options
author | Jim Meyering <jim@meyering.net> | 2001-08-25 15:09:31 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2001-08-25 15:09:31 +0000 |
commit | 598382f21600159f5896155877a2f2e04effb0bf (patch) | |
tree | af08eb1fc23e91844d7122e5fc69218229aea292 | |
parent | ba2900b4aabaf468ba28a06812d2ea9c46743b25 (diff) | |
download | coreutils-598382f21600159f5896155877a2f2e04effb0bf.tar.xz |
(main): Fix a typo in the previous patch: missing
a bounds check for examples like `uniq a b c'.
-rw-r--r-- | src/uniq.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/uniq.c b/src/uniq.c index 36119cff8..fc2b19a82 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) |