dcavalca / rpms / grub2

Forked from rpms/grub2 3 years ago
Clone

Blame SOURCES/0479-kern-mm-Fix-grub_debug_calloc-compilation-error.patch

80913e
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
80913e
From: Marco A Benatto <mbenatto@redhat.com>
80913e
Date: Tue, 9 Feb 2021 12:33:06 -0300
80913e
Subject: [PATCH] kern/mm: Fix grub_debug_calloc() compilation error
80913e
80913e
Fix compilation error due to missing parameter to
80913e
grub_printf() when MM_DEBUG is defined.
80913e
80913e
Fixes: 64e26162e (calloc: Make sure we always have an overflow-checking calloc() available)
80913e
80913e
Signed-off-by: Marco A Benatto <mbenatto@redhat.com>
80913e
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
80913e
---
80913e
 grub-core/kern/mm.c | 2 +-
80913e
 1 file changed, 1 insertion(+), 1 deletion(-)
80913e
80913e
diff --git a/grub-core/kern/mm.c b/grub-core/kern/mm.c
80913e
index 80d0720d005..d8c8377578b 100644
80913e
--- a/grub-core/kern/mm.c
80913e
+++ b/grub-core/kern/mm.c
80913e
@@ -594,7 +594,7 @@ grub_debug_calloc (const char *file, int line, grub_size_t nmemb, grub_size_t si
80913e
 
80913e
   if (grub_mm_debug)
80913e
     grub_printf ("%s:%d: calloc (0x%" PRIxGRUB_SIZE ", 0x%" PRIxGRUB_SIZE ") = ",
80913e
-		 file, line, size);
80913e
+		 file, line, nmemb, size);
80913e
   ptr = grub_calloc (nmemb, size);
80913e
   if (grub_mm_debug)
80913e
     grub_printf ("%p\n", ptr);