Actions
Bug #56993
openrgw_object_lock.cc:The maximum time of bucket object lock is 24855 days
% Done:
0%
Source:
Tags:
object-lock low-hanging-fruit backport_processed
Backport:
pacific quincy reef
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
rgw
Pull request ID:
Crash signature (v1):
Crash signature (v2):
Description
ceph::real_time RGWObjectLock::get_lock_until_date(const ceph::real_time& mtime) const {
if (!rule_exist) {
return ceph::real_time();
}
//if days = 24855,days*60*60*24 will overflow
int days = get_days();
if (days <= 0) {
days = get_years()*365;
}
return mtime + make_timespan(days*24*60*60);
}
Maybe we can replace int with int64_t or uint64_t?
ceph::real_time RGWObjectLock::get_lock_until_date(const ceph::real_time& mtime) const {
if (!rule_exist) {
return ceph::real_time();
}
int64_t days = get_days();
if (days <= 0) {
days = get_years()*365;
}
return mtime + make_timespan(days*24*60*60);
}
like this?
Files
Actions