Blame SOURCES/0002-Fix-a-bad-allocation-size.patch

38ab4d
From 340766d4d1a745723e9ef53dd3f6b6c175203638 Mon Sep 17 00:00:00 2001
5fb29d
From: Peter Jones <pjones@redhat.com>
5fb29d
Date: Wed, 10 Sep 2014 15:27:02 -0400
38ab4d
Subject: [PATCH 02/31] Fix a bad allocation size.
5fb29d
5fb29d
Covscan found this.
5fb29d
5fb29d
Signed-off-by: Peter Jones <pjones@redhat.com>
5fb29d
---
5fb29d
 src/lib/efi.c | 2 +-
5fb29d
 1 file changed, 1 insertion(+), 1 deletion(-)
5fb29d
5fb29d
diff --git a/src/lib/efi.c b/src/lib/efi.c
5fb29d
index 133b8bb..6b25dfe 100644
5fb29d
--- a/src/lib/efi.c
5fb29d
+++ b/src/lib/efi.c
5fb29d
@@ -717,7 +717,7 @@ make_linux_load_option(uint8_t **data, size_t *data_size)
5fb29d
 	size_t needed;
5fb29d
 	off_t buf_offset = 0, desc_offset;
5fb29d
 
5fb29d
-	load_option = calloc(1, sizeof (load_option));
5fb29d
+	load_option = calloc(1, sizeof (*load_option));
5fb29d
 	if (load_option == NULL)
5fb29d
 		return -1;
5fb29d
 	buf = (uint8_t *)load_option;
5fb29d
-- 
38ab4d
2.7.4
5fb29d