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.
This commit is contained in:
parent
18730f8d47
commit
e40b20a368
@ -2654,7 +2654,7 @@ main(int argc, char *argv[])
|
|||||||
if (optind < argc)
|
if (optind < argc)
|
||||||
{
|
{
|
||||||
fprintf(stderr, _("%s: too many command-line arguments (first is \"%s\")\n"),
|
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"),
|
fprintf(stderr, _("Try \"%s --help\" for more information.\n"),
|
||||||
progname);
|
progname);
|
||||||
exit(1);
|
exit(1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user