[syslinux] [PATCH] core/diskboot.inc: fix handover info sanity checks
Michal Soltys
soltys at ziu.info
Sun Feb 20 16:17:17 PST 2011
Signed-off-by: Michal Soltys <soltys at ziu.info>
---
core/diskboot.inc | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/core/diskboot.inc b/core/diskboot.inc
index 7c02066..3d48dfd 100644
--- a/core/diskboot.inc
+++ b/core/diskboot.inc
@@ -182,12 +182,12 @@ floppy:
harddisk:
mov dx,[di-76-10] ; Original DS
mov si,[di-76-12] ; Original SI
- shr si,4
- jz .no_partition ; SI == 0 -> assume no partition
+ shl dx,4
add dx,si
+ jz .no_partition ; DS:SI == 0 -> assume no partition
cmp dx,1024 ; DS:SI < 1K (inside the IVT)?
jb .no_partition
- cmp dx,PartInfo >> 4 ; DS:SI in overwritten memory?
+ cmp dx,PartInfo ; DS:SI in overwritten memory?
jae .no_partition
test byte [di-76],7Fh ; Sanity check: "active flag" should
jnz .no_partition ; be 00 or 80
--
1.7.2.1
More information about the Syslinux
mailing list