diff --git a/fs/gpt.c b/fs/gpt.c index 8887c2b..5738084 100644 --- a/fs/gpt.c +++ b/fs/gpt.c @@ -55,6 +55,9 @@ void block_gpt_init(struct block_device *dev) used_count++; + if(entries[i].lba_first > dev->block_count) + continue; + /* Name and register the partition */ char *buf = kzalloc(64, ALLOC_KERN); snprintf(buf, "%sp%d", 63, dev->name, used_count - 1);