Decode as many or as few partition entries as the label claims there
are. We have already checked it against the caller provided maxpart.
This commit is contained in:
parent
4275d83ab5
commit
3959198cc5
@ -127,7 +127,7 @@ bsd_disklabel_le_dec(u_char *ptr, struct disklabel *d, int maxpart)
|
||||
d->d_npartitions = le16dec(ptr + 138);
|
||||
d->d_bbsize = le32dec(ptr + 140);
|
||||
d->d_sbsize = le32dec(ptr + 144);
|
||||
for (i = 0; i < MAXPARTITIONS; i++)
|
||||
for (i = 0; i < d->d_npartitions; i++)
|
||||
bsd_partition_le_dec(ptr + 148 + 16 * i, &d->d_partitions[i]);
|
||||
return(0);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user