From: Vladimir Serbinenko Date: Mon, 9 Nov 2015 02:24:04 +0000 (+0100) Subject: cbfs: Fix corner case and compilation with recdent gcc X-Git-Tag: 2.02-beta3~183 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cb28250cfce1da059d94b57eee54cb250bb786fe;p=thirdparty%2Fgrub.git cbfs: Fix corner case and compilation with recdent gcc Accept the header to touch the jump address at 0xfffffff0. Fix compilation for 64-bit EFI with recent GCC. --- diff --git a/grub-core/fs/cbfs.c b/grub-core/fs/cbfs.c index 5fc9c0147..0842701a6 100644 --- a/grub-core/fs/cbfs.c +++ b/grub-core/fs/cbfs.c @@ -352,7 +352,7 @@ init_cbfsdisk (void) reading ROMs through controller directly. */ if (ptr < 0xff000000 - || 0xffffffff - ptr < sizeof (*head) + 0x10 + || 0xffffffff - ptr < (grub_uint32_t) sizeof (*head) + 0xf || !validate_head (head)) return;