From 45fdbbb42649c0f3ae121b54e505fe38a9191287 Mon Sep 17 00:00:00 2001 From: Jaime Casanova Date: Fri, 22 Oct 2010 18:38:35 -0500 Subject: [PATCH] Another segmentation fault caused by an uninitialized string --- repmgr.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/repmgr.c b/repmgr.c index d1ff8f1b..48d7ed27 100644 --- a/repmgr.c +++ b/repmgr.c @@ -539,7 +539,10 @@ do_standby_clone(void) const char *last_wal_segment = NULL; if (dest_dir == NULL) + { + dest_dir = malloc(5); strcpy(dest_dir, "."); + } /* Check this directory could be used as a PGDATA dir */ switch (check_dir(dest_dir))