]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* grub-core/loader/i386/coreboot/chainloader.c (load_segment): Use
authorVladimir Serbinenko <phcoder@gmail.com>
Sun, 10 Nov 2013 23:06:52 +0000 (00:06 +0100)
committerVladimir Serbinenko <phcoder@gmail.com>
Sun, 10 Nov 2013 23:06:52 +0000 (00:06 +0100)
right buffer for temporary load.

ChangeLog
grub-core/loader/i386/coreboot/chainloader.c

index 245b2702e1936e18752bfff5a668de1086c73070..c06aa81ca707bda5cff221a4ff829fd405fd12e0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-11-10  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * grub-core/loader/i386/coreboot/chainloader.c (load_segment): Use
+       right buffer for temporary load.
+
 2013-11-10  Vladimir Serbinenko  <phcoder@gmail.com>
 
        * grub-core/loader/i386/coreboot/chainloader.c: Support tianocore.
index 6e1bd9830cb75c06c06d865ea40443867834fdde..d4cc40b7f243538ae035944eb9c7fbab1c9fe2bf 100644 (file)
@@ -162,7 +162,7 @@ load_segment (grub_file_t file, const char *filename,
        buf = grub_malloc (*size);
        if (!buf)
          return grub_errno;
-       if (grub_file_read (file, load_addr, *size)
+       if (grub_file_read (file, buf, *size)
            != (grub_ssize_t) *size)
          {
            if (!grub_errno)
@@ -187,6 +187,8 @@ load_segment (grub_file_t file, const char *filename,
        /* ELzmaFinishMode finishMode,
           ELzmaStatus *status, ISzAlloc *alloc)*/
        grub_free (buf);
+       grub_dprintf ("chain", "%x, %x, %x, %x\n",
+                     insize, src_len, outsize, dst_len);
        if (res != SZ_OK
            || src_len != insize || dst_len != outsize)
          return grub_error (GRUB_ERR_BAD_OS, "decompression failure %d", res);