Blame SOURCES/0009-add_to_boot_order-set-the-new-BootOrder-entry-at-the.patch

453bef
From 2931d55f8b547663eee88be432e89d2c18506761 Mon Sep 17 00:00:00 2001
453bef
From: Peter Jones <pjones@redhat.com>
453bef
Date: Tue, 28 Mar 2017 13:32:39 -0400
453bef
Subject: [PATCH 09/11] add_to_boot_order(): set the new BootOrder entry at the
453bef
 right place
453bef
453bef
Coverity noticed that this was setting just anything really.
453bef
453bef
Signed-off-by: Peter Jones <pjones@redhat.com>
453bef
---
453bef
 linux/libfwup.c | 1 +
453bef
 1 file changed, 1 insertion(+)
453bef
453bef
diff --git a/linux/libfwup.c b/linux/libfwup.c
453bef
index 3bf2659..8fb4e2e 100644
453bef
--- a/linux/libfwup.c
453bef
+++ b/linux/libfwup.c
453bef
@@ -825,6 +825,7 @@ add_to_boot_order(uint16_t boot_entry)
453bef
 	}
453bef
 	memcpy(new_boot_order, boot_order, boot_order_size);
453bef
 
453bef
+	i = boot_order_size / sizeof (uint16_t);
453bef
 	new_boot_order[i] = boot_entry;
453bef
 	boot_order_size += sizeof (uint16_t);
453bef
 
453bef
-- 
453bef
2.12.2
453bef