Blame SOURCES/0068-grub-core-lib-relocator.c-Fix-the-case-when-end-of-l.patch

a85e8e
From aadd7669d805fcd510687ba5d0ca9e78c2d88a93 Mon Sep 17 00:00:00 2001
a85e8e
From: Vladimir Serbinenko <phcoder@gmail.com>
a85e8e
Date: Wed, 26 Mar 2014 08:48:30 +0100
a85e8e
Subject: [PATCH 068/260] * grub-core/lib/relocator.c: Fix the case when end of
a85e8e
 leftover is used.
a85e8e
a85e8e
---
a85e8e
 ChangeLog                 | 4 ++++
a85e8e
 grub-core/lib/relocator.c | 2 ++
a85e8e
 2 files changed, 6 insertions(+)
a85e8e
a85e8e
diff --git a/ChangeLog b/ChangeLog
a85e8e
index 091535beb..9404edab8 100644
a85e8e
--- a/ChangeLog
a85e8e
+++ b/ChangeLog
a85e8e
@@ -1,3 +1,7 @@
a85e8e
+2014-03-26  Vladimir Serbinenko  <phcoder@gmail.com>
a85e8e
+
a85e8e
+	* grub-core/lib/relocator.c: Fix the case when end of leftover is used.
a85e8e
+
a85e8e
 2014-03-26  Fu Wei <fu.wei@linaro.org>
a85e8e
 
a85e8e
 	* grub-core/loader/arm64/linux.c: Remove redundant "0x".
a85e8e
diff --git a/grub-core/lib/relocator.c b/grub-core/lib/relocator.c
a85e8e
index 9f9770bc4..cb11ea5fa 100644
a85e8e
--- a/grub-core/lib/relocator.c
a85e8e
+++ b/grub-core/lib/relocator.c
a85e8e
@@ -865,6 +865,8 @@ malloc_in_range (struct grub_relocator *rel,
a85e8e
 			% GRUB_RELOCATOR_FIRMWARE_REQUESTS_QUANT;
a85e8e
 		      struct grub_relocator_fw_leftover *lo
a85e8e
 			= events[last_lo].leftover;
a85e8e
+		      if (offend == 0 && alloc_end != alloc_start)
a85e8e
+			offend = GRUB_RELOCATOR_FIRMWARE_REQUESTS_QUANT;
a85e8e
 		      lo->freebytes[offstart / 8]
a85e8e
 			&= ((1 << (8 - (start % 8))) - 1);
a85e8e
 		      grub_memset (lo->freebytes + (offstart + 7) / 8, 0,
a85e8e
-- 
a85e8e
2.13.0
a85e8e