aboutsummaryrefslogtreecommitdiff
path: root/src/bin/pg_archivecleanup/pg_archivecleanup.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/pg_archivecleanup/pg_archivecleanup.c')
-rw-r--r--src/bin/pg_archivecleanup/pg_archivecleanup.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index 2b3d15dd582..c5ce4ecd3c1 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -32,7 +32,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[MAXFNAMELEN]; /* 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)