You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
904 B
29 lines
904 B
From ca8b750f4c618cecddb3c2694509dc19daeae46a Mon Sep 17 00:00:00 2001 |
|
From: Peter Jones <pjones@redhat.com> |
|
Date: Fri, 24 Jul 2020 13:57:27 -0400 |
|
Subject: [PATCH 332/336] linux loader: avoid overflow on initrd size |
|
calculation |
|
|
|
Signed-off-by: Peter Jones <pjones@redhat.com> |
|
--- |
|
grub-core/loader/linux.c | 4 ++-- |
|
1 file changed, 2 insertions(+), 2 deletions(-) |
|
|
|
diff --git a/grub-core/loader/linux.c b/grub-core/loader/linux.c |
|
index be6fa0f4d45..2305281df04 100644 |
|
--- a/grub-core/loader/linux.c |
|
+++ b/grub-core/loader/linux.c |
|
@@ -151,8 +151,8 @@ grub_initrd_init (int argc, char *argv[], |
|
initrd_ctx->nfiles = 0; |
|
initrd_ctx->components = 0; |
|
|
|
- initrd_ctx->components = grub_zalloc (argc |
|
- * sizeof (initrd_ctx->components[0])); |
|
+ initrd_ctx->components = grub_calloc (argc, |
|
+ sizeof (initrd_ctx->components[0])); |
|
if (!initrd_ctx->components) |
|
return grub_errno; |
|
|
|
-- |
|
2.26.2 |
|
|
|
|