diff options
| author | H. Peter Anvin <hpa@zytor.com> | 2007-10-02 11:17:36 -0700 |
|---|---|---|
| committer | H. Peter Anvin <hpa@zytor.com> | 2007-10-02 11:17:53 -0700 |
| commit | c0019a8215949ca0b9de18b6c772dc0e8ccb334d (patch) | |
| tree | 42382863167f0c766b0ea65f46ae383298430afb /bootsect.inc | |
| parent | a81fb89a445ae0dca286c861d8d51f705533df0d (diff) | |
| download | syslinux-c0019a8215949ca0b9de18b6c772dc0e8ccb334d.tar.gz | |
bootsect.inc: make sure the $PnP header can fit inside the segment
Terminate the search as soon as the $PnP header would fall outside the
segment, not just the $PnP signature itself.
Diffstat (limited to 'bootsect.inc')
| -rw-r--r-- | bootsect.inc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bootsect.inc b/bootsect.inc index 69899565..715100a5 100644 --- 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! + jbe .findpnp jmp .donepnp ; No $PnP header found .foundpnp: movzx cx,byte [fs:bx+5] ; Size of $PnP header |
