diff options
Diffstat (limited to 'src/backend/access/transam/xlog.c')
-rw-r--r-- | src/backend/access/transam/xlog.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index cd81c600fc7..3cc74bfe2ea 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -3888,7 +3888,7 @@ CleanupBackupHistory(void) { DIR *xldir; struct dirent *xlde; - char path[MAXPGPATH]; + char path[MAXPGPATH + sizeof(XLOGDIR)]; xldir = AllocateDir(XLOGDIR); if (xldir == NULL) @@ -3906,7 +3906,7 @@ CleanupBackupHistory(void) ereport(DEBUG2, (errmsg("removing transaction log backup history file \"%s\"", xlde->d_name))); - snprintf(path, MAXPGPATH, XLOGDIR "/%s", xlde->d_name); + snprintf(path, sizeof(path), XLOGDIR "/%s", xlde->d_name); unlink(path); XLogArchiveCleanup(xlde->d_name); } @@ -10011,7 +10011,7 @@ do_pg_start_backup(const char *backupidstr, bool fast, TimeLineID *starttli_p, /* Collect information about all tablespaces */ while ((de = ReadDir(tblspcdir, "pg_tblspc")) != NULL) { - char fullpath[MAXPGPATH]; + char fullpath[MAXPGPATH + 10]; char linkpath[MAXPGPATH]; char *relpath = NULL; int rllen; |