From 6b6901a26f5683d30e6a3192d5b3a7da1dba69c3 Mon Sep 17 00:00:00 2001 From: Thomas Munro Date: Thu, 9 Jan 2025 13:17:36 +1300 Subject: Fix off_t overflow in pg_basebackup on Windows. walmethods.c used off_t to navigate around a pg_wal.tar file that could exceed 2GB, which doesn't work on Windows and would fail with misleading errors. Use pgoff_t instead. Back-patch to all supported branches. Author: Davinder Singh Reported-by: Jakub Wartak Discussion: https://postgr.es/m/CAKZiRmyM4YnokK6Oenw5JKwAQ3rhP0YTz2T-tiw5dAQjGRXE3Q%40mail.gmail.com --- src/bin/pg_basebackup/receivelog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/bin/pg_basebackup/receivelog.c') diff --git a/src/bin/pg_basebackup/receivelog.c b/src/bin/pg_basebackup/receivelog.c index ad866a76024..c58448f3176 100644 --- a/src/bin/pg_basebackup/receivelog.c +++ b/src/bin/pg_basebackup/receivelog.c @@ -191,7 +191,7 @@ static bool close_walfile(StreamCtl *stream, XLogRecPtr pos) { char *fn; - off_t currpos; + pgoff_t currpos; int r; if (walfile == NULL) -- cgit v1.2.3