From 72809480d658fbc0654239b2f089991c077c676a Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sat, 23 May 2015 16:05:52 -0400 Subject: [PATCH] Fix incorrect snprintf() limit. Typo in commit 7cbee7c0a. No practical effect since the buffer should never actually be overrun, but various compilers and static analyzers will whine about it. Petr Jelinek --- src/backend/access/transam/xlog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index 87a3b48914..b913bf3ebc 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -7279,7 +7279,7 @@ StartupXLOG(void) char partialpath[MAXPGPATH]; XLogFilePath(origpath, EndOfLogTLI, endLogSegNo); - snprintf(partialfname, MAXPGPATH, "%s.partial", origfname); + snprintf(partialfname, MAXFNAMELEN, "%s.partial", origfname); snprintf(partialpath, MAXPGPATH, "%s.partial", origpath); /* -- 2.40.0