]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw/restore: Use strtoull to read size till 2^64
authorSoumya Koduri <skoduri@redhat.com>
Fri, 23 May 2025 21:39:50 +0000 (03:09 +0530)
committerSoumya Koduri <skoduri@redhat.com>
Thu, 10 Jul 2025 16:40:59 +0000 (22:10 +0530)
Reviewed-by: Adam Emerson <aemerson@redhat.com>
Reviewed-by: Matt Benjamin <mbenjamin@redhat.com>
Signed-off-by: Soumya Koduri <skoduri@redhat.com>
(cherry picked from commit b3c867a121a7315b5a9e2d30d0af44c08676f8ca)

src/rgw/driver/rados/rgw_lc_tier.cc

index c1dcd2387a5407da3a63e6cb2ab309226e5fe1c9..7c2628d10314c8a695d3de0fba2ebc6de09fc81f 100644 (file)
@@ -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);            
     }
   }