mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-26 17:19:22 +00:00
* grub-core/kern/mm.c (get_header_from_pointer): Put a more informative
message on double free. Put the value of magic in case of mismatch.
This commit is contained in:
1 parent
9e86d4c59a
commit
3988c4a09f
2 files changed
+9
-1
No files matched your search
@@ -1,3 +1,8 @@
|
|||||||
|
2012-06-22 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* grub-core/kern/mm.c (get_header_from_pointer): Put a more informative
|
||||||
|
message on double free. Put the value of magic in case of mismatch.
|
||||||
|
|
||||||
2012-06-22 Vladimir Serbinenko <phcoder@gmail.com>
|
2012-06-22 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
Speed-up video on yeeloong.
|
Speed-up video on yeeloong.
|
||||||
|
|||||||
+4
-1
@@ -98,8 +98,11 @@ get_header_from_pointer (void *ptr, grub_mm_header_t *p, grub_mm_region_t *r)
|
|||||||
grub_fatal ("out of range pointer %p", ptr);
|
grub_fatal ("out of range pointer %p", ptr);
|
||||||
|
|
||||||
*p = (grub_mm_header_t) ptr - 1;
|
*p = (grub_mm_header_t) ptr - 1;
|
||||||
|
if ((*p)->magic == GRUB_MM_FREE_MAGIC)
|
||||||
|
grub_fatal ("double free at %p", *p);
|
||||||
if ((*p)->magic != GRUB_MM_ALLOC_MAGIC)
|
if ((*p)->magic != GRUB_MM_ALLOC_MAGIC)
|
||||||
grub_fatal ("alloc magic is broken at %p", *p);
|
grub_fatal ("alloc magic is broken at %p: %lx", *p,
|
||||||
|
(unsigned long) (*p)->magic);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Initialize a region starting from ADDR and whose size is SIZE,
|
/* Initialize a region starting from ADDR and whose size is SIZE,
|
||||||
|
|||||||
Reference in new issue
Block a user