aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2009-02-16 21:02:23 -0800
committerH. Peter Anvin <hpa@zytor.com>2009-02-16 21:04:59 -0800
commitf4cbcf6081b27dd2fff04c68717cd5ac7a214df7 (patch)
treef5df56badd80c1cbbcceeb5c5152fd93a415c0d3
parent51f563a2e52d1e2668e7b7a3d480c4f1e4b89d97 (diff)
downloadsyslinux-elf-f4cbcf6081b27dd2fff04c68717cd5ac7a214df7.tar.gz
syslinux-elf-f4cbcf6081b27dd2fff04c68717cd5ac7a214df7.tar.xz
syslinux-elf-f4cbcf6081b27dd2fff04c68717cd5ac7a214df7.zip
pxelinux: Minimum size for PXENV+ is 0x28 bytes
The minimum size for the PXENV+ structure is 0x28 bytes (for PXE 1.x/2.0); the size will be 0x2C if the !PXE pointer is provided.
-rw-r--r--core/pxelinux.asm3
1 files changed, 3 insertions, 0 deletions
diff --git a/core/pxelinux.asm b/core/pxelinux.asm
index 4dfa7af6..e23c3dd9 100644
--- a/core/pxelinux.asm
+++ b/core/pxelinux.asm
@@ -392,6 +392,8 @@ have_pxenv:
cmp ax,0201h ; API version 2.1 or higher
jb old_api
+ cmp byte [es:bx+8],2Ch ; Space for !PXE pointer?
+ jb old_api
mov si,bx
mov ax,es
les bx,[es:bx+28h] ; !PXE structure pointer
@@ -1020,6 +1022,7 @@ is_struc:
cmp word [es:bx+4],'V+'
jne .bad
movzx cx,[es:bx+8]
+ cmp cx,28h
jb .bad
.checksum:
mov si,bx