Skip to content

Commit 5b09daf

Browse files
committed
mbr: Added checks for extended partitions
1 parent fd9e4c1 commit 5b09daf

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

features/filesystem/bd/MBRBlockDevice.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,11 @@ int MBRBlockDevice::init()
211211
}
212212

213213
// Check for valid entry
214-
if (table->entries[_part-1].type == 0x00) {
214+
// 0x00 = no entry
215+
// 0x05, 0x0f = extended partitions, currently not supported
216+
if ((table->entries[_part-1].type == 0x00 ||
217+
table->entries[_part-1].type == 0x05 ||
218+
table->entries[_part-1].type == 0x0f)) {
215219
delete[] buffer;
216220
return BD_ERROR_INVALID_PARTITION;
217221
}

0 commit comments

Comments
 (0)