]> glassweightruler.freedombox.rocks Git - Ventoy.git/commitdiff
Fix a bug when booting nitrux-release-amd64_2021.05.28.iso (#953)
authorlongpanda <admin@ventoy.net>
Fri, 11 Jun 2021 12:36:17 +0000 (20:36 +0800)
committerlongpanda <admin@ventoy.net>
Fri, 11 Jun 2021 12:36:17 +0000 (20:36 +0800)
IPXE/ipxe_mod_code/ipxe-3fe683e/src/arch/x86/interface/pcbios/ventoy_int13.c

index 75960c2b5f19f0c699f2f3098476b7f560d712c8..2671761da9fef9574e82010fdefcc6656659eabd 100644 (file)
@@ -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 );
 
        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 );
        /* Use INT 13, 42 to read the boot image */
        eltorito_address.bufsize =
                offsetof ( typeof ( eltorito_address ), buffer_phys );