aboutsummaryrefslogtreecommitdiffstats
path: root/core/isolinux.asm
diff options
context:
space:
mode:
authorMatt Fleming <matt.fleming@intel.com>2013-01-10 21:33:32 +0000
committerMatt Fleming <matt.fleming@intel.com>2013-01-11 08:39:27 +0000
commit17a36e2c91706512e6c425222c9a9a451d9db854 (patch)
tree1ec17f8a05c1b8aa8b91d6a6bc30b4ac16f47289 /core/isolinux.asm
parent04cf121216bf2d5c6fc9e01028519f7d655d66cf (diff)
downloadsyslinux-17a36e2c91706512e6c425222c9a9a451d9db854.tar.gz
isolinux: Update LBA in getlinsec loop
We need to increment the Logical Block Address in eax by the number of sectors we passed to getlinsec after every invocation, otherwise we'll start with the same sector everytime. This bug was discovered when booting an isohybrid image, which failed to boot after printing the following error, "Image checksum error, sorry..." because the isolinux.bin was bigger than 32K, and thus invoked the getlinsec loop that reads the file in chunks. Cc: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Diffstat (limited to 'core/isolinux.asm')
-rw-r--r--core/isolinux.asm3
1 files changed, 3 insertions, 0 deletions
diff --git a/core/isolinux.asm b/core/isolinux.asm
index 8866298e..b292d8f9 100644
--- a/core/isolinux.asm
+++ b/core/isolinux.asm
@@ -428,7 +428,9 @@ MaxLMA equ 384*1024 ; Reasonable limit (384K)
.ok:
xor bx,bx
push bp
+ push eax
call getlinsec
+ pop eax
pop cx
mov dx,cx
pop bp
@@ -436,6 +438,7 @@ MaxLMA equ 384*1024 ; Reasonable limit (384K)
shl cx,SECTOR_SHIFT - 4
add bx,cx
+ add eax,edx
sub bp,dx
jnz .more