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: v18.2.1~388^2~1 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=f523c76d1d192dd3fd9dfd77b0f71de4c15e0228;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 0c57793fec952..17561793e3c04 100644 --- a/src/rgw/rgw_object_lock.cc +++ b/src/rgw/rgw_object_lock.cc @@ -58,7 +58,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; }