]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
xen_file: Fix invalid payload size
authorMichael Chang <mchang@suse.com>
Fri, 11 Mar 2016 09:26:51 +0000 (10:26 +0100)
committerVladimir Serbinenko <phcoder@gmail.com>
Fri, 11 Mar 2016 09:26:51 +0000 (10:26 +0100)
grub-core/loader/i386/xen_file.c

index 5836218909876dc3c1bfd5e8ad0239d4b8edb7c8..37f9ad8ac008cdff4f36a2dc6b2083bd55fdf90f 100644 (file)
@@ -55,11 +55,11 @@ grub_xen_file (grub_file_t file)
   grub_dprintf ("xen", "found bzimage payload 0x%llx-0x%llx\n",
                (unsigned long long) (lh.setup_sects + 1) * 512
                + lh.payload_offset,
-               (unsigned long long) lh.payload_length - 4);
+               (unsigned long long) lh.payload_length);
 
   off_file = grub_file_offset_open (file, (lh.setup_sects + 1) * 512
                                    + lh.payload_offset,
-                                   lh.payload_length - 4);
+                                   lh.payload_length);
   if (!off_file)
     goto fail;