From 6a78cf94218fc156442449adef479d5330499d8d Mon Sep 17 00:00:00 2001 From: safocl Date: Thu, 30 Jan 2025 07:50:06 +0400 Subject: [PATCH] fix: nullptr dereferencing some code contained nullptr dereferencing --- ntfsprogs/cluster.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ntfsprogs/cluster.c b/ntfsprogs/cluster.c index 82188f4c..d8e1ff13 100644 --- a/ntfsprogs/cluster.c +++ b/ntfsprogs/cluster.c @@ -56,6 +56,10 @@ int cluster_find(ntfs_volume *vol, LCN c_begin, LCN c_end, cluster_cb *cb, void return -1; m_ctx = mft_get_search_ctx(vol); + + if (!m_ctx) + return -1; + m_ctx->flags_search = FEMR_IN_USE | FEMR_BASE_RECORD; count = 0;