aboutsummaryrefslogtreecommitdiff
path: root/src/bin/pg_dump/pg_backup_directory.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/pg_dump/pg_backup_directory.c')
-rw-r--r--src/bin/pg_dump/pg_backup_directory.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bin/pg_dump/pg_backup_directory.c b/src/bin/pg_dump/pg_backup_directory.c
index fb8c7713a50..57243c5971c 100644
--- a/src/bin/pg_dump/pg_backup_directory.c
+++ b/src/bin/pg_dump/pg_backup_directory.c
@@ -449,11 +449,11 @@ _LoadBlobs(ArchiveHandle *AH)
/* Read the blobs TOC file line-by-line, and process each blob */
while ((cfgets(ctx->blobsTocFH, line, MAXPGPATH)) != NULL)
{
- char fname[MAXPGPATH];
+ char fname[MAXPGPATH + 1];
char path[MAXPGPATH];
/* Can't overflow because line and fname are the same length. */
- if (sscanf(line, "%u %s\n", &oid, fname) != 2)
+ if (sscanf(line, "%u %" CppAsString2(MAXPGPATH) "s\n", &oid, fname) != 2)
fatal("invalid line in large object TOC file \"%s\": \"%s\"",
fname, line);