From: Mark Kogan Date: Mon, 26 Apr 2021 12:36:08 +0000 (+0300) Subject: rgw: fix segfault related to explicit object manifest handling X-Git-Tag: v15.2.14~78^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1d53482a3a45d7f441392fe35391c678f7293a8f;p=ceph.git rgw: fix segfault related to explicit object manifest handling Fixes: https://tracker.ceph.com/issues/50467 Signed-off-by: Mark Kogan (cherry picked from commit ae00453515b17d25a5d42430e744855b020ccec6) --- diff --git a/src/rgw/rgw_obj_manifest.cc b/src/rgw/rgw_obj_manifest.cc index a91c51c4658ea..a3aaccb7310a6 100644 --- a/src/rgw/rgw_obj_manifest.cc +++ b/src/rgw/rgw_obj_manifest.cc @@ -226,6 +226,12 @@ void RGWObjManifest::obj_iterator::operator++() if (manifest->explicit_objs) { ++explicit_iter; + if (explicit_iter == manifest->objs.end()) { + ofs = manifest->obj_size; + stripe_size = 0; + return; + } + update_explicit_pos(); update_location();