]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: fix segfault related to explicit object manifest handling 41028/head
authorMark Kogan <mkogan@redhat.com>
Mon, 26 Apr 2021 12:36:08 +0000 (15:36 +0300)
committerMark Kogan <mkogan@redhat.com>
Mon, 26 Apr 2021 12:36:08 +0000 (15:36 +0300)
Fixes: https://tracker.ceph.com/issues/50467
Signed-off-by: Mark Kogan <mkogan@redhat.com>
src/rgw/rgw_obj_manifest.cc

index e1fcc3af979612ad4a5ed7b1856a15ee635d0015..7e5a4ec80af54ca74a004009a10eca7771534dc9 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();