diff options
author | Robert Haas <rhaas@postgresql.org> | 2024-10-02 09:59:04 -0400 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2024-10-02 09:59:04 -0400 |
commit | d94cf5ca7fad9cd81af5eac491bfbaf0facb9f6f (patch) | |
tree | 757c737bd7d37a01707f15a57257b1f0b34dabb8 /src/common/parse_manifest.c | |
parent | 7b2822ecf944a6aa429c05cc7f070001c3817934 (diff) | |
download | postgresql-d94cf5ca7fad9cd81af5eac491bfbaf0facb9f6f.tar.gz postgresql-d94cf5ca7fad9cd81af5eac491bfbaf0facb9f6f.zip |
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
Diffstat (limited to 'src/common/parse_manifest.c')
-rw-r--r-- | src/common/parse_manifest.c | 4 |
1 files changed, 2 insertions, 2 deletions
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"); |