From: Casey Bodley Date: Wed, 14 Jun 2023 12:42:00 +0000 (-0400) Subject: rgw: s3 object lock avoids overflow in retention date X-Git-Tag: v16.2.15~118^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F52605%2Fhead;p=ceph.git rgw: s3 object lock avoids overflow in retention date Fixes: https://tracker.ceph.com/issues/56993 Signed-off-by: Casey Bodley (cherry picked from commit dd87a0ff845549ce94b740881c614c77c1857865) --- diff --git a/src/rgw/rgw_object_lock.cc b/src/rgw/rgw_object_lock.cc index 5c0119befaa1..83156cd7863c 100644 --- a/src/rgw/rgw_object_lock.cc +++ b/src/rgw/rgw_object_lock.cc @@ -56,7 +56,7 @@ ceph::real_time RGWObjectLock::get_lock_until_date(const ceph::real_time& mtime) if (!rule_exist) { return ceph::real_time(); } - int days = get_days(); + int64_t days = get_days(); if (days <= 0) { days = get_years()*365; }