]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* grub-core/lib/relocator.c: Fix the case when end of leftover is used.
authorVladimir Serbinenko <phcoder@gmail.com>
Wed, 26 Mar 2014 07:48:30 +0000 (08:48 +0100)
committerVladimir Serbinenko <phcoder@gmail.com>
Wed, 26 Mar 2014 07:48:30 +0000 (08:48 +0100)
ChangeLog
grub-core/lib/relocator.c

index 44ce649e458d7906a2c840062b1c2b01ab5c9ff0..b3f077a5e936976b8df90f2d55723ef2132286c7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2014-03-26  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * grub-core/lib/relocator.c: Fix the case when end of leftover is used.
+
 2014-03-26  Fu Wei <fu.wei@linaro.org>
 
        * grub-core/loader/arm64/linux.c: Remove redundant "0x".
index 9f9770bc48dcf020ab71132a56596359e72fedd8..cb11ea5fa27f904f51ec5855a9ee818e24e60f6b 100644 (file)
@@ -865,6 +865,8 @@ malloc_in_range (struct grub_relocator *rel,
                        % GRUB_RELOCATOR_FIRMWARE_REQUESTS_QUANT;
                      struct grub_relocator_fw_leftover *lo
                        = events[last_lo].leftover;
+                     if (offend == 0 && alloc_end != alloc_start)
+                       offend = GRUB_RELOCATOR_FIRMWARE_REQUESTS_QUANT;
                      lo->freebytes[offstart / 8]
                        &= ((1 << (8 - (start % 8))) - 1);
                      grub_memset (lo->freebytes + (offstart + 7) / 8, 0,