mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-27 08:56:29 +00:00
Another segmentation fault caused by an uninitialized string
This commit is contained in:
3
repmgr.c
3
repmgr.c
@@ -539,7 +539,10 @@ do_standby_clone(void)
|
|||||||
const char *last_wal_segment = NULL;
|
const char *last_wal_segment = NULL;
|
||||||
|
|
||||||
if (dest_dir == NULL)
|
if (dest_dir == NULL)
|
||||||
|
{
|
||||||
|
dest_dir = malloc(5);
|
||||||
strcpy(dest_dir, ".");
|
strcpy(dest_dir, ".");
|
||||||
|
}
|
||||||
|
|
||||||
/* Check this directory could be used as a PGDATA dir */
|
/* Check this directory could be used as a PGDATA dir */
|
||||||
switch (check_dir(dest_dir))
|
switch (check_dir(dest_dir))
|
||||||
|
|||||||
Reference in New Issue
Block a user