0149-kern-mm-Fix-grub_debug_calloc-compilation-error.patch 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. From a9d8de960834f376087856f9d60a214b47c76f61 Mon Sep 17 00:00:00 2001
  2. From: Marco A Benatto <mbenatto@redhat.com>
  3. Date: Tue, 9 Feb 2021 12:33:06 -0300
  4. Subject: [PATCH] kern/mm: Fix grub_debug_calloc() compilation error
  5. Fix compilation error due to missing parameter to
  6. grub_printf() when MM_DEBUG is defined.
  7. Fixes: 64e26162e (calloc: Make sure we always have an overflow-checking calloc() available)
  8. Signed-off-by: Marco A Benatto <mbenatto@redhat.com>
  9. Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
  10. Signed-off-by: Stefan Sørensen <stefan.sorensen@spectralink.com>
  11. ---
  12. grub-core/kern/mm.c | 2 +-
  13. 1 file changed, 1 insertion(+), 1 deletion(-)
  14. diff --git a/grub-core/kern/mm.c b/grub-core/kern/mm.c
  15. index f2822a8..c070afc 100644
  16. --- a/grub-core/kern/mm.c
  17. +++ b/grub-core/kern/mm.c
  18. @@ -594,7 +594,7 @@ grub_debug_calloc (const char *file, int line, grub_size_t nmemb, grub_size_t si
  19. if (grub_mm_debug)
  20. grub_printf ("%s:%d: calloc (0x%" PRIxGRUB_SIZE ", 0x%" PRIxGRUB_SIZE ") = ",
  21. - file, line, size);
  22. + file, line, nmemb, size);
  23. ptr = grub_calloc (nmemb, size);
  24. if (grub_mm_debug)
  25. grub_printf ("%p\n", ptr);
  26. --
  27. 2.14.2