dcavalca / rpms / grub2

Forked from rpms/grub2 3 years ago
Clone

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

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