mirror of
https://git.code.sf.net/p/ntfs-3g/ntfs-3g.git
synced 2024-11-23 18:14:24 +08:00
Make ntfsinfo more resilient to corrupt metadata. Otherwise it can cause an
infinite loop...
This commit is contained in:
parent
d15ed62ae4
commit
a36323bc62
@ -1443,6 +1443,10 @@ static int ntfs_dump_index_entries(INDEX_ENTRY *entry, INDEX_ATTR_TYPE type)
|
||||
ntfs_dump_index_data(entry, type);
|
||||
break;
|
||||
}
|
||||
if (!entry->length) {
|
||||
ntfs_log_verbose("\tWARNING: Corrupt index entry, skipping this index block.\n");
|
||||
break;
|
||||
}
|
||||
entry = (INDEX_ENTRY *)((u8 *)entry +
|
||||
le16_to_cpu(entry->length));
|
||||
numb_entries++;
|
||||
|
Loading…
Reference in New Issue
Block a user