From 4e094563d4989ae4451fb61ea0584986f6a711cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Pierre=20Andr=C3=A9?= Date: Mon, 12 Jul 2021 08:31:18 +0200 Subject: [PATCH] Checked $MFT data to be ready before fetching an extent --- libntfs-3g/attrib.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libntfs-3g/attrib.c b/libntfs-3g/attrib.c index 12989615..799f2ee4 100644 --- a/libntfs-3g/attrib.c +++ b/libntfs-3g/attrib.c @@ -3217,6 +3217,12 @@ is_enumeration: ctx->mrec = ctx->base_mrec; } else { /* We want an extent record. */ + if (!vol->mft_na) { + ntfs_log_perror("$MFT not ready for " + "opening an extent to inode %lld\n", + (long long)base_ni->mft_no); + break; + } ni = ntfs_extent_inode_open(base_ni, al_entry->mft_reference); if (!ni)