mbr: Added checks for extended partitions

pull/6074/head
Christopher Haster 2018-02-13 14:03:02 -06:00
parent fd9e4c12fd
commit 5b09daf0f9
1 changed files with 5 additions and 1 deletions

View File

@ -211,7 +211,11 @@ int MBRBlockDevice::init()
}
// Check for valid entry
if (table->entries[_part-1].type == 0x00) {
// 0x00 = no entry
// 0x05, 0x0f = extended partitions, currently not supported
if ((table->entries[_part-1].type == 0x00 ||
table->entries[_part-1].type == 0x05 ||
table->entries[_part-1].type == 0x0f)) {
delete[] buffer;
return BD_ERROR_INVALID_PARTITION;
}