gpt: add check for LBA 0
This commit is contained in:
parent
f566ef905f
commit
65795f55f4
1 changed files with 4 additions and 1 deletions
5
fs/gpt.c
5
fs/gpt.c
|
|
@ -55,7 +55,10 @@ void block_gpt_init(struct block_device *dev)
|
|||
|
||||
used_count++;
|
||||
|
||||
if(entry->lba_first > dev->block_count)
|
||||
if (entry->lba_first == 0)
|
||||
continue;
|
||||
|
||||
if (entry->lba_first > dev->block_count)
|
||||
continue;
|
||||
|
||||
/* Name and register the partition */
|
||||
|
|
|
|||
Loading…
Reference in a new issue