Fix invalid segment assumption in pxelinux syslinux-3.53-pre6
authorH. Peter Anvin <hpa@zytor.com>
Sun, 18 Nov 2007 00:02:49 +0000 (16:02 -0800)
committerH. Peter Anvin <hpa@zytor.com>
Sun, 18 Nov 2007 00:02:49 +0000 (16:02 -0800)
Fix an invalid segment assumption in pxelinux, which caused the
"naked ::" not to work correctly.

dnsresolv.inc
pxelinux.asm

index 4fe2040..a8f7dbd 100644 (file)
@@ -182,7 +182,9 @@ LastDNSServer       dw DNSServers
 ; Points to a null-terminated or :-terminated string in DS:SI
 ; and returns the name in EAX if it exists and can be found.
 ; If EAX = 0 on exit, the lookup failed.
-
+;
+; No segment assumptions permitted.
+;
                section .text
 dns_resolv:
                push ds
index fbfc1a4..3ce89b0 100644 (file)
@@ -1382,11 +1382,13 @@ free_socket:
 
 ;
 ; parse_dotquad:
-;             Read a dot-quad pathname in DS:SI and output an IP
-;             address in EAX, with SI pointing to the first
-;             nonmatching character.
+;              Read a dot-quad pathname in DS:SI and output an IP
+;              address in EAX, with SI pointing to the first
+;              nonmatching character.
 ;
-;             Return CF=1 on error.
+;              Return CF=1 on error.
+;
+;              No segment assumptions permitted.
 ;
 parse_dotquad:
                push cx
@@ -1436,10 +1438,12 @@ parse_dotquad:
 ;             The first four bytes of the manged name is the IP address of
 ;             the download host.
 ;
+;              No segment assumptions permitted.
+;
 mangle_name:
                push di
                push si
-               mov eax,[ServerIP]
+               mov eax,[cs:ServerIP]
                cmp byte [si],0
                je .noip                        ; Null filename?!?!
                cmp word [si],'::'              ; Leading ::?