]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: fix vector index out of range in RGWReadDataSyncRecoveringShardsCR
authorCasey Bodley <cbodley@redhat.com>
Fri, 19 Oct 2018 16:54:44 +0000 (12:54 -0400)
committerNathan Cutler <ncutler@suse.com>
Sat, 3 Nov 2018 14:24:55 +0000 (15:24 +0100)
Fixes: http://tracker.ceph.com/issues/36537
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 077ceb17d9d86f394a2805c9be123b2533e77d40)

src/rgw/rgw_data_sync.cc

index ce81a5d5d41fdd5dcb9bc4c7ee01e42dae898fae..65a5b2a7242043522e3201db8867a99e67280c9b 100644 (file)
@@ -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";