comboot.inc: use the correct upper limit
authorH. Peter Anvin <hpa@zytor.com>
Wed, 27 Feb 2008 21:02:03 +0000 (13:02 -0800)
committerH. Peter Anvin <hpa@zytor.com>
Wed, 27 Feb 2008 21:02:03 +0000 (13:02 -0800)
The exact upper limit is 65536-256-2 = 65278 = 0xFEFE bytes.

comboot.inc

index 3a3c306..99a4115 100644 (file)
@@ -128,8 +128,8 @@ is_comboot_image:
                mov cx,10000h >> SECTOR_SHIFT
                                        ; Absolute maximum # of sectors
                call getfssec
-               cmp ecx,0FF00h          ; Maximum size
-               jae comboot_too_large
+               cmp ecx,65536-256-2     ; Maximum size
+               ja comboot_too_large
 
                ; And invoke the program...
                mov ax,es