mbr: Added checks for extended partitions

pull/6201/head
Christopher Haster 2018-02-13 14:03:02 -06:00 committed by Cruz Monrreal II
parent aee5511276
commit 0a85303144
1 changed files with 5 additions and 1 deletions

View File

@ -211,7 +211,11 @@ int MBRBlockDevice::init()
} }
// Check for valid entry // 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; delete[] buffer;
return BD_ERROR_INVALID_PARTITION; return BD_ERROR_INVALID_PARTITION;
} }