nalika / rpms / grub2

Forked from rpms/grub2 2 years ago
Clone

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

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