From: Vladimir Serbinenko Date: Sun, 10 Nov 2013 23:06:52 +0000 (+0100) Subject: * grub-core/loader/i386/coreboot/chainloader.c (load_segment): Use X-Git-Tag: grub-2.02-beta1~405 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=87d62d7d29a03be977388a01b330cd6332b6d3fd;p=thirdparty%2Fgrub.git * grub-core/loader/i386/coreboot/chainloader.c (load_segment): Use right buffer for temporary load. --- diff --git a/ChangeLog b/ChangeLog index 245b2702e..c06aa81ca 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2013-11-10 Vladimir Serbinenko + + * grub-core/loader/i386/coreboot/chainloader.c (load_segment): Use + right buffer for temporary load. + 2013-11-10 Vladimir Serbinenko * grub-core/loader/i386/coreboot/chainloader.c: Support tianocore. diff --git a/grub-core/loader/i386/coreboot/chainloader.c b/grub-core/loader/i386/coreboot/chainloader.c index 6e1bd9830..d4cc40b7f 100644 --- a/grub-core/loader/i386/coreboot/chainloader.c +++ b/grub-core/loader/i386/coreboot/chainloader.c @@ -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);