]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: fix segfault related to explicit object manifest handling 42633/head
authorMark Kogan <mkogan@redhat.com>
Mon, 26 Apr 2021 12:36:08 +0000 (15:36 +0300)
committerCory Snyder <csnyder@iland.com>
Wed, 4 Aug 2021 13:56:10 +0000 (09:56 -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 87dbb9a942fbdbf82250e4cbacaa8ced7c3f1270..ca8c0bae75a4c51fbdf1f01f2cd21b6a51ea68b5 100644 (file)
@@ -205,6 +205,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();