Skip to content

Commit 6a78cf9

Browse files
committed
fix: nullptr dereferencing
some code contained nullptr dereferencing
1 parent 75dcdc2 commit 6a78cf9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ntfsprogs/cluster.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ int cluster_find(ntfs_volume *vol, LCN c_begin, LCN c_end, cluster_cb *cb, void
5656
return -1;
5757

5858
m_ctx = mft_get_search_ctx(vol);
59+
60+
if (!m_ctx)
61+
return -1;
62+
5963
m_ctx->flags_search = FEMR_IN_USE | FEMR_BASE_RECORD;
6064
count = 0;
6165

0 commit comments

Comments
 (0)