]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: fix off-by-one in RGWDataChangesLog::get_info 13181/head
authorCasey Bodley <cbodley@redhat.com>
Wed, 11 Jan 2017 14:32:59 +0000 (09:32 -0500)
committerNathan Cutler <ncutler@suse.com>
Mon, 19 Jun 2017 17:13:40 +0000 (19:13 +0200)
Fixes: http://tracker.ceph.com/issues/18488
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit a0974fdcf62e60cf31bc15588e7b718da6f6ade3)

src/rgw/rgw_bucket.cc

index c375f2dcf3195f8d765a188e5bc945fdf1a4b423..9e9c17c3099da4b2e2179ae0ee47ec6671435bb2 100644 (file)
@@ -1799,7 +1799,7 @@ int RGWDataChangesLog::list_entries(const real_time& start_time, const real_time
 
 int RGWDataChangesLog::get_info(int shard_id, RGWDataChangesLogInfo *info)
 {
-  if (shard_id > num_shards)
+  if (shard_id >= num_shards)
     return -EINVAL;
 
   string oid = oids[shard_id];