Skip to content

Commit b3c867a

Browse files
committed
rgw/restore: Use strtoull to read size till 2^64
Reviewed-by: Adam Emerson <[email protected]> Reviewed-by: Matt Benjamin <[email protected]> Signed-off-by: Soumya Koduri <[email protected]>
1 parent f00ac7c commit b3c867a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/rgw/driver/rados/rgw_lc_tier.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,8 @@ int rgw_cloud_tier_get_object(RGWLCCloudTierCtx& tier_ctx, bool head,
400400
}
401401

402402
if (header.first == "CONTENT_LENGTH") {
403-
accounted_size = atoi(val.c_str());
403+
char* end = nullptr;
404+
accounted_size = strtoull(val.c_str(), &end, 10);
404405
}
405406
}
406407

0 commit comments

Comments
 (0)