Skip to content

Commit 83f2584

Browse files
committed
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.
1 parent 987277f commit 83f2584

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/bin/initdb/initdb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2573,7 +2573,7 @@ main(int argc, char *argv[])
25732573
if (optind < argc)
25742574
{
25752575
fprintf(stderr, _("%s: too many command-line arguments (first is \"%s\")\n"),
2576-
progname, argv[optind + 1]);
2576+
progname, argv[optind]);
25772577
fprintf(stderr, _("Try \"%s --help\" for more information.\n"),
25782578
progname);
25792579
exit(1);

0 commit comments

Comments
 (0)