mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-26 16:46:28 +00:00
repmgr: initialise witness connection parameter buffers as empty strings
There's a risk we may be accessing uninitialised memory if any of the parameters are not supplied. Addresses GitHub #315.
This commit is contained in:
6
repmgr.c
6
repmgr.c
@@ -5946,9 +5946,9 @@ do_witness_create(void)
|
|||||||
char master_hba_file[MAXLEN];
|
char master_hba_file[MAXLEN];
|
||||||
bool success;
|
bool success;
|
||||||
|
|
||||||
char witness_port[MAXLEN];
|
char witness_port[MAXLEN] = "";
|
||||||
char repmgr_user[MAXLEN];
|
char repmgr_user[MAXLEN] = "";
|
||||||
char repmgr_db[MAXLEN];
|
char repmgr_db[MAXLEN] = "";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Extract the repmgr user and database names from the conninfo string
|
* Extract the repmgr user and database names from the conninfo string
|
||||||
|
|||||||
Reference in New Issue
Block a user