Skip to content

Commit 210d5a7

Browse files
committed
lib/blob: fix heap-buffer-overflow during unmap
1 parent 716e864 commit 210d5a7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/blob/blobstore.c

+4
Original file line numberDiff line numberDiff line change
@@ -8994,6 +8994,10 @@ blob_free_cluster_msg(void *arg)
89948994

89958995
start_cluster_idx = (ctx->cluster_num / SPDK_EXTENTS_PER_EP) * SPDK_EXTENTS_PER_EP;
89968996
for (i = 0; i < SPDK_EXTENTS_PER_EP; ++i) {
8997+
if (ctx->blob->active.num_clusters <= start_cluster_idx + i) {
8998+
break;
8999+
}
9000+
89979001
if (ctx->blob->active.clusters[start_cluster_idx + i] != 0) {
89989002
free_extent_page = false;
89999003
break;

0 commit comments

Comments
 (0)