]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: fix segfault related to explicit object manifest handling 41420/head
authorMark Kogan <mkogan@redhat.com>
Mon, 26 Apr 2021 12:36:08 +0000 (15:36 +0300)
committerCory Snyder <csnyder@iland.com>
Wed, 19 May 2021 18:54:53 +0000 (14:54 -0400)
Fixes: https://tracker.ceph.com/issues/50467
Signed-off-by: Mark Kogan <mkogan@redhat.com>
(cherry picked from commit ae00453515b17d25a5d42430e744855b020ccec6)

src/rgw/rgw_obj_manifest.cc

index a91c51c4658eace59a1636901fc0c2e3bbb1a654..a3aaccb7310a6980e5efcc5bf57ed6f80d8144b5 100644 (file)
@@ -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();