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:
a81fb89
)
bootsect.inc: make sure the $PnP header can fit inside the segment
author
H. Peter Anvin
<hpa@zytor.com>
Tue, 2 Oct 2007 18:17:36 +0000
(11:17 -0700)
committer
H. Peter Anvin
<hpa@zytor.com>
Tue, 2 Oct 2007 18:17:53 +0000
(11:17 -0700)
Terminate the search as soon as the $PnP header would fall outside the
segment, not just the $PnP signature itself.
bootsect.inc
patch
|
blob
|
history
diff --git
a/bootsect.inc
b/bootsect.inc
index
6989956
..
715100a
100644
(file)
--- a/
bootsect.inc
+++ b/
bootsect.inc
@@
-150,8
+150,8
@@
replace_bootstrap:
cmp dword [fs:bx], "$PnP"
jz .foundpnp
inc bx
- cmp bx,-
3
; Don't get a segment overflow error!
- jb .findpnp
+ cmp bx,-
21h
; Don't get a segment overflow error!
+ jb
e
.findpnp
jmp .donepnp ; No $PnP header found
.foundpnp:
movzx cx,byte [fs:bx+5] ; Size of $PnP header