aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2013-11-26 09:58:17 -0800
committerH. Peter Anvin <hpa@zytor.com>2013-12-11 18:04:04 -0800
commit88d17d136c21b8afb7d27e091cbb1f757ded80df (patch)
tree741e512ba6fee4e8d9ecd0c2890057997b341f75
parent61f106ba8a5b2a7c2d9855291fd9e7f4a4d3143d (diff)
downloadsyslinux-88d17d136c21b8afb7d27e091cbb1f757ded80df.tar.gz
syslinux-88d17d136c21b8afb7d27e091cbb1f757ded80df.tar.xz
syslinux-88d17d136c21b8afb7d27e091cbb1f757ded80df.zip
isolinux: Clear upper half of EDX before using
In checkin: cb015497a4e4 isolinux: Update LBA in getlinsec loop ... we use EDX as a sector count, but the sector count is actually in DX, and the upper half of EDX is uninitialized. If the BIOS enters with a nonzero value in the upper half of EDX, this breaks horribly. At least one set of BIOSes has been identified where if the LBA > 64K then the upper half of EDX will be nonzero. Reported-by: Carl Duff <cdrw2400@gmail.com> Reported-by: Philip Müller <philm@manjaro.org> Tested-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r--core/isolinux.asm2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/isolinux.asm b/core/isolinux.asm
index db6d2d42..dd0fa892 100644
--- a/core/isolinux.asm
+++ b/core/isolinux.asm
@@ -430,7 +430,7 @@ MaxLMA equ 384*1024 ; Reasonable limit (384K)
call getlinsec
pop eax
pop cx
- mov dx,cx
+ movzx edx,cx
pop bp
pop bx