]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* grub-core/lib/relocator.c (malloc_in_range): Take into account that
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Mon, 15 Nov 2010 08:50:58 +0000 (09:50 +0100)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Mon, 15 Nov 2010 08:50:58 +0000 (09:50 +0100)
allocate_regbeg may need to create new chunk header.

ChangeLog
grub-core/lib/relocator.c

index 7c33d8cc6b6a8d2bc72ee9529ad74f6bc5362615..1c862e1f0e944cfe53439aa791263f6cb3c810db 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-11-15  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * 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  <phcoder@gmail.com>
 
        Fix quoting in legacy parser.
index 90f6802d74c25f98fab04fc8a36adbb547991745..dbd5fe4d06a4de571d4ee5ade5c6998f9782c172 100644 (file)
@@ -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