diff options
author | Itagaki Takahiro <itagaki.takahiro@gmail.com> | 2009-12-15 00:17:50 +0000 |
---|---|---|
committer | Itagaki Takahiro <itagaki.takahiro@gmail.com> | 2009-12-15 00:17:50 +0000 |
commit | 6f1bf75d50a576a326c1529180982622981855f5 (patch) | |
tree | a19ac619f9bf5020337ab336b726bd26d8e3c951 | |
parent | a620d5005df6e4b6fc09ba914f19402dc07289dd (diff) | |
download | postgresql-6f1bf75d50a576a326c1529180982622981855f5.tar.gz |
Fix pg_ctl initdb without options.
Passing NULL string to snprintf is avoided.
-rw-r--r-- | src/bin/pg_ctl/pg_ctl.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/bin/pg_ctl/pg_ctl.c b/src/bin/pg_ctl/pg_ctl.c index 1e874a700f..03de3957d1 100644 --- a/src/bin/pg_ctl/pg_ctl.c +++ b/src/bin/pg_ctl/pg_ctl.c @@ -4,7 +4,7 @@ * * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group * - * $PostgreSQL: pgsql/src/bin/pg_ctl/pg_ctl.c,v 1.116 2009/12/10 06:32:28 petere Exp $ + * $PostgreSQL: pgsql/src/bin/pg_ctl/pg_ctl.c,v 1.117 2009/12/15 00:17:50 itagaki Exp $ * *------------------------------------------------------------------------- */ @@ -656,6 +656,9 @@ do_init(void) if (exec_path == NULL) exec_path = find_other_exec_or_die(argv0, "initdb", "initdb (PostgreSQL) " PG_VERSION "\n"); + if (pgdata_opt == NULL) + pgdata_opt = ""; + if (post_opts == NULL) post_opts = ""; |