From: longpanda Date: Fri, 11 Jun 2021 12:36:29 +0000 (+0800) Subject: Merge branch 'master' of https://github.com/ventoy/Ventoy X-Git-Tag: v1.0.46~1 X-Git-Url: https://glassweightruler.freedombox.rocks/gitweb/Ventoy.git/commitdiff_plain/7bb13fc18a47cad595bd4c1f88535b172a373724?hp=2a435084c2a57a93f493690f1ade710e828b4d20 Merge branch 'master' of https://github.com/ventoy/Ventoy --- diff --git a/IPXE/ipxe_mod_code/ipxe-3fe683e/src/arch/x86/interface/pcbios/ventoy_int13.c b/IPXE/ipxe_mod_code/ipxe-3fe683e/src/arch/x86/interface/pcbios/ventoy_int13.c index 75960c2..2671761 100644 --- a/IPXE/ipxe_mod_code/ipxe-3fe683e/src/arch/x86/interface/pcbios/ventoy_int13.c +++ b/IPXE/ipxe_mod_code/ipxe-3fe683e/src/arch/x86/interface/pcbios/ventoy_int13.c @@ -1354,6 +1354,15 @@ static int int13_load_eltorito ( unsigned int drive, struct segoff *address ) { DBG ( "INT13 drive %02x El Torito boot image loads at %04x:%04x\n", drive, address->segment, address->offset ); + if (catalog.boot.length > 256) + { + if (g_debug) + { + printf("trim length from %d to 4\n", catalog.boot.length); + } + catalog.boot.length = 4; + } + /* Use INT 13, 42 to read the boot image */ eltorito_address.bufsize = offsetof ( typeof ( eltorito_address ), buffer_phys );