Fix a mistake with size calculation
This commit is contained in:
parent
6a42fe54db
commit
4a04699258
1 changed files with 2 additions and 2 deletions
|
@ -308,12 +308,12 @@ malloc_in_range (struct grub_relocator *rel,
|
|||
|
||||
if (best_addr - (grub_addr_t) hb >= sizeof (*hb))
|
||||
{
|
||||
hb->size = (best_addr - (grub_addr_t) hb) >> GRUB_MM_ALIGN_LOG2;
|
||||
hb->size = ((best_addr - (grub_addr_t) hb) >> GRUB_MM_ALIGN_LOG2) - 1;
|
||||
if (foll)
|
||||
{
|
||||
foll->next = hb;
|
||||
hbp->next = foll;
|
||||
if (rb->first == hbp)
|
||||
if (rb->first == hb)
|
||||
rb->first = foll;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue