From: Casey Bodley Date: Mon, 18 Oct 2021 18:15:33 +0000 (-0400) Subject: rgw: fix for uninitialized oldest_gen/latest_gen X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=aec6f86219f5ff9ee7884734b83178f4ee9d4f2e;p=ceph.git rgw: fix for uninitialized oldest_gen/latest_gen when data sync queries RGWOp_BILog_Info from an un-upgraded gateway, it doesn't include the oldest_gen/latest_gen fields. so initialize these variables to 0 by default Signed-off-by: Casey Bodley --- diff --git a/src/rgw/rgw_data_sync.h b/src/rgw/rgw_data_sync.h index bc0063e9e0fe1..6ce22ba8767c6 100644 --- a/src/rgw/rgw_data_sync.h +++ b/src/rgw/rgw_data_sync.h @@ -647,8 +647,8 @@ struct rgw_bucket_index_marker_info { std::string master_ver; std::string max_marker; bool syncstopped{false}; - uint64_t oldest_gen; - uint64_t latest_gen; + uint64_t oldest_gen = 0; + uint64_t latest_gen = 0; void decode_json(JSONObj *obj) { JSONDecoder::decode_json("bucket_ver", bucket_ver, obj);