From: Casey Bodley Date: Fri, 19 Oct 2018 16:54:44 +0000 (-0400) Subject: rgw: fix vector index out of range in RGWReadDataSyncRecoveringShardsCR X-Git-Tag: v13.2.3~47^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=98d04accd15fa8a0c4b67dd1db16e4b95b4c226e;p=ceph.git rgw: fix vector index out of range in RGWReadDataSyncRecoveringShardsCR Fixes: http://tracker.ceph.com/issues/36537 Signed-off-by: Casey Bodley (cherry picked from commit 077ceb17d9d86f394a2805c9be123b2533e77d40) --- diff --git a/src/rgw/rgw_data_sync.cc b/src/rgw/rgw_data_sync.cc index ce81a5d5d41fd..65a5b2a724204 100644 --- a/src/rgw/rgw_data_sync.cc +++ b/src/rgw/rgw_data_sync.cc @@ -179,7 +179,7 @@ class RGWReadDataSyncRecoveringShardsCR : public RGWShardCollectCR { bool RGWReadDataSyncRecoveringShardsCR::spawn_next() { - if (shard_id > num_shards) + if (shard_id >= num_shards) return false; string error_oid = RGWDataSyncStatusManager::shard_obj_name(env->source_zone, shard_id) + ".retry";