From 72fe4df3f8156d5c906a2a9993c1386518bd549d Mon Sep 17 00:00:00 2001 From: xie xingguo Date: Fri, 8 Jul 2016 08:59:08 +0800 Subject: [PATCH] os/bluestore: check against that we don't access violation Some day we might want make this interface more applicable by handling the abnormal cases more gracefully... Signed-off-by: xie xingguo --- src/os/bluestore/bluestore_types.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/os/bluestore/bluestore_types.h b/src/os/bluestore/bluestore_types.h index 44e0e8b5d27..20a632439f5 100644 --- a/src/os/bluestore/bluestore_types.h +++ b/src/os/bluestore/bluestore_types.h @@ -283,6 +283,7 @@ struct bluestore_blob_t { } b_len += b_off; while (b_len) { + assert(p != extents.end()); if (!p->is_valid()) { return false; } -- 2.39.5