mirror of
https://github.com/postgres/postgres.git
synced 2025-05-03 22:24:49 +03:00
Defend against overrun of ExtraOptions array --- strictly paranoia,
since the person or script starting the postmaster has to be trusted anyway.
This commit is contained in:
parent
99b225c528
commit
5dfd5063e2
@ -37,7 +37,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.405 2004/06/24 21:02:55 tgl Exp $
|
* $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.406 2004/07/10 23:29:16 tgl Exp $
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
*
|
*
|
||||||
@ -450,8 +450,9 @@ PostmasterMain(int argc, char *argv[])
|
|||||||
/*
|
/*
|
||||||
* Other options to pass to the backend on the command line
|
* Other options to pass to the backend on the command line
|
||||||
*/
|
*/
|
||||||
strcat(ExtraOptions, " ");
|
snprintf(ExtraOptions + strlen(ExtraOptions),
|
||||||
strcat(ExtraOptions, optarg);
|
sizeof(ExtraOptions) - strlen(ExtraOptions),
|
||||||
|
" %s", optarg);
|
||||||
break;
|
break;
|
||||||
case 'p':
|
case 'p':
|
||||||
SetConfigOption("port", optarg, PGC_POSTMASTER, PGC_S_ARGV);
|
SetConfigOption("port", optarg, PGC_POSTMASTER, PGC_S_ARGV);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user