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

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