From: Vladimir 'phcoder' Serbinenko Date: Mon, 15 Nov 2010 08:50:58 +0000 (+0100) Subject: * grub-core/lib/relocator.c (malloc_in_range): Take into account that X-Git-Tag: 1.99~323 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f6bbabc3732c167464aeb7a165c693c94cbb1195;p=thirdparty%2Fgrub.git * grub-core/lib/relocator.c (malloc_in_range): Take into account that allocate_regbeg may need to create new chunk header. --- diff --git a/ChangeLog b/ChangeLog index 7c33d8cc6..1c862e1f0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-11-15 Vladimir Serbinenko + + * grub-core/lib/relocator.c (malloc_in_range): Take into account that + allocate_regbeg may need to create new chunk header. + 2010-11-14 Vladimir Serbinenko Fix quoting in legacy parser. diff --git a/grub-core/lib/relocator.c b/grub-core/lib/relocator.c index 90f6802d7..dbd5fe4d0 100644 --- a/grub-core/lib/relocator.c +++ b/grub-core/lib/relocator.c @@ -597,7 +597,8 @@ malloc_in_range (struct grub_relocator *rel, events[N].hancestor = pa; N++; events[N].type = REG_BEG_END; - events[N].pos = grub_vtop (p + p->size) - sizeof (*r); + events[N].pos = grub_vtop (p + p->size) - sizeof (*r) + - sizeof (struct grub_mm_header); N++; } else