projects
/
platform
/
upstream
/
syslinux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
834e9d5
)
Fail if C/H/S geometry is wrong. This is necessary for things that probe
author
hpa
<hpa>
Sat, 24 Jan 2004 21:12:20 +0000
(21:12 +0000)
committer
hpa
<hpa>
Sat, 24 Jan 2004 21:12:20 +0000
(21:12 +0000)
for geometry.
memdisk/memdisk.asm
patch
|
blob
|
history
diff --git
a/memdisk/memdisk.asm
b/memdisk/memdisk.asm
index
1f18ae7
..
053fa41
100644
(file)
--- a/
memdisk/memdisk.asm
+++ b/
memdisk/memdisk.asm
@@
-308,8
+308,12
@@
setup_regs:
movzx ebx,cl ; Sector number
and bl,3Fh
dec ebx ; Sector number is 1-based
+ cmp bx,[Sectors]
+ jae .overrun
movzx edi,P_DH ; Head number
movzx eax,word [Heads]
+ cmp di,ax
+ jae .overrun
shr cl,6
xchg cl,ch ; Now (E)CX <- cylinder number
mul ecx ; eax <- Heads*cyl# (edx <- 0)