diff options
Diffstat (limited to 'contrib/pg_archivecleanup/pg_archivecleanup.c')
-rw-r--r-- | contrib/pg_archivecleanup/pg_archivecleanup.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/pg_archivecleanup/pg_archivecleanup.c b/contrib/pg_archivecleanup/pg_archivecleanup.c index 212b267fcfa..9f97153ca0f 100644 --- a/contrib/pg_archivecleanup/pg_archivecleanup.c +++ b/contrib/pg_archivecleanup/pg_archivecleanup.c @@ -30,7 +30,7 @@ char *additional_ext = NULL; /* Extension to remove from filenames */ char *archiveLocation; /* where to find the archive? */ char *restartWALFileName; /* the file from which we can restart restore */ -char WALFilePath[MAXPGPATH]; /* the file path including archive */ +char WALFilePath[MAXPGPATH * 2]; /* the file path including archive */ char exclusiveCleanupFileName[MAXPGPATH]; /* the oldest file we * want to remain in * archive */ @@ -133,7 +133,7 @@ CleanupPriorWALFiles(void) * extension that might have been chopped off before testing * the sequence. */ - snprintf(WALFilePath, MAXPGPATH, "%s/%s", + snprintf(WALFilePath, sizeof(WALFilePath), "%s/%s", archiveLocation, xlde->d_name); if (dryrun) |