From 0a85303144bc2e028065629d505d024eb14667d7 Mon Sep 17 00:00:00 2001 From: Christopher Haster Date: Tue, 13 Feb 2018 14:03:02 -0600 Subject: [PATCH] mbr: Added checks for extended partitions --- features/filesystem/bd/MBRBlockDevice.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/features/filesystem/bd/MBRBlockDevice.cpp b/features/filesystem/bd/MBRBlockDevice.cpp index 134ce9848b..4ab11b4e4d 100644 --- a/features/filesystem/bd/MBRBlockDevice.cpp +++ b/features/filesystem/bd/MBRBlockDevice.cpp @@ -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; }