From b3c867a121a7315b5a9e2d30d0af44c08676f8ca Mon Sep 17 00:00:00 2001 From: Soumya Koduri Date: Sat, 24 May 2025 03:09:50 +0530 Subject: [PATCH] rgw/restore: Use strtoull to read size till 2^64 Reviewed-by: Adam Emerson Reviewed-by: Matt Benjamin Signed-off-by: Soumya Koduri --- src/rgw/driver/rados/rgw_lc_tier.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/rgw/driver/rados/rgw_lc_tier.cc b/src/rgw/driver/rados/rgw_lc_tier.cc index c1dcd2387a540..7c2628d10314c 100644 --- a/src/rgw/driver/rados/rgw_lc_tier.cc +++ b/src/rgw/driver/rados/rgw_lc_tier.cc @@ -400,7 +400,8 @@ int rgw_cloud_tier_get_object(RGWLCCloudTierCtx& tier_ctx, bool head, } if (header.first == "CONTENT_LENGTH") { - accounted_size = atoi(val.c_str()); + char* end = nullptr; + accounted_size = strtoull(val.c_str(), &end, 10); } } -- 2.39.5