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
810 B

From bc5f74e97ff48b89028a5f3cd0064401b37c0951 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Mon, 1 May 2017 14:56:53 -0400
Subject: [PATCH 11/22] efi_variable_import(): make sure var.data_size is set.
Covscan noticed that var.data_size isn't set when we memcpy the
structure. It should be set.
Signed-off-by: Peter Jones <pjones@redhat.com>
---
src/export.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/export.c b/src/export.c
index 89af720..27ce501 100644
--- a/src/export.c
+++ b/src/export.c
@@ -118,6 +118,7 @@ efi_variable_import(uint8_t *data, size_t size, efi_variable_t **var_out)
var.name[i] = wname[i] & 0xff;
ptr += name_len * 2;
+ var.data_size = data_len;
var.data = malloc(data_len);
if (!var.data) {
int saved_errno = errno;
--
2.12.2