From ff4c40fc2e3c092d17a218ae6132de4e6034c8ee Mon Sep 17 00:00:00 2001 From: redickwang Date: Fri, 19 May 2017 15:08:12 +0800 Subject: [PATCH] rgw: segment fault when shard id out of range Fixes: http://tracker.ceph.com/issues/19732 Signed-off-by: redickwang --- src/rgw/rgw_bucket.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/rgw/rgw_bucket.cc b/src/rgw/rgw_bucket.cc index 8b2bc5f46df..d485ebbf958 100644 --- a/src/rgw/rgw_bucket.cc +++ b/src/rgw/rgw_bucket.cc @@ -1730,6 +1730,8 @@ int RGWDataChangesLog::list_entries(int shard, const real_time& start_time, cons const string& marker, string *out_marker, bool *truncated) { + if (shard >= num_shards) + return -EINVAL; list log_entries; -- 2.39.5