From d94cf5ca7fad9cd81af5eac491bfbaf0facb9f6f Mon Sep 17 00:00:00 2001 From: Robert Haas Date: Wed, 2 Oct 2024 09:59:04 -0400 Subject: File size in a backup manifest should use uint64, not size_t. size_t is the size of an object in memory, not the size of a file on disk. Thanks to Tom Lane for noting the error. Discussion: http://postgr.es/m/1865585.1727803933@sss.pgh.pa.us --- src/common/parse_manifest.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/common/parse_manifest.c') diff --git a/src/common/parse_manifest.c b/src/common/parse_manifest.c index 5a7b491e9a9..ad2d0fd808f 100644 --- a/src/common/parse_manifest.c +++ b/src/common/parse_manifest.c @@ -650,7 +650,7 @@ static void json_manifest_finalize_file(JsonManifestParseState *parse) { JsonManifestParseContext *context = parse->context; - size_t size; + uint64 size; char *ep; int checksum_string_length; pg_checksum_type checksum_type; @@ -688,7 +688,7 @@ json_manifest_finalize_file(JsonManifestParseState *parse) } /* Parse size. */ - size = strtoul(parse->size, &ep, 10); + size = strtou64(parse->size, &ep, 10); if (*ep) json_manifest_parse_failure(parse->context, "file size is not an integer"); -- cgit v1.2.3