postgres.git / summary / log / commit / refs

commit    63ea46f5db90709032d98819c744881253d933f7
Author:   Robert Haas <rhaas@postgresql.org>
Date:     Thu Sep 06 19:43:46 2012 +0000
First released in: 9.3.0, 8.3.21, 8.4.14, 9.0.10, 9.1.6, 9.2.0

    Fix "too many arguments" messages not to index off the end of argv[].
    
    This affects initdb, clusterdb, reindexdb, and vacuumdb in master
    and 9.2; in earlier branches, only initdb is affected.


src/bin/initdb/initdb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/initdb/initdb.c b/src/bin/initdb/initdb.c index 32d47d8fc99..5f6e1d6e077 100644 --- a/src/bin/initdb/initdb.c +++ b/src/bin/initdb/initdb.c @@ -2571,7 +2571,7 @@ main(int argc, char *argv[]) if (optind < argc) { fprintf(stderr, _("%s: too many command-line arguments (first is \"%s\")\n"), - progname, argv[optind + 1]); + progname, argv[optind]); fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname); exit(1); [parent: f98d8d59a19b]