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