[syslinux:master] core, pxe: Fix handling of unqualified DNS names

syslinux-bot for H. Peter Anvin hpa at zytor.com
Sun Nov 14 13:21:03 PST 2010


Commit-ID:  c11b65a96eef32eedea52f7b594c320a15062baf
Gitweb:     http://syslinux.zytor.com/commit/c11b65a96eef32eedea52f7b594c320a15062baf
Author:     H. Peter Anvin <hpa at zytor.com>
AuthorDate: Sun, 14 Nov 2010 13:14:49 -0800
Committer:  H. Peter Anvin <hpa at zytor.com>
CommitDate: Sun, 14 Nov 2010 13:14:49 -0800

core, pxe: Fix handling of unqualified DNS names

Actually append the domain name to the end of an unqualified DNS name
like we should have done all along.

Reported-by: Gene Cumm <gene.cumm at gmail.com>
Signed-off-by: H. Peter Anvin <hpa at zytor.com>


---
 core/fs/pxe/dnsresolv.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/core/fs/pxe/dnsresolv.c b/core/fs/pxe/dnsresolv.c
index 2b263fa..641ea38 100644
--- a/core/fs/pxe/dnsresolv.c
+++ b/core/fs/pxe/dnsresolv.c
@@ -215,7 +215,7 @@ uint32_t dns_resolv(const char *name)
     if (!dots) {
         p--; /* Remove final null */
         /* Uncompressed DNS label set so it ends in null */
-        strcpy(p, LocalDomain);
+        p = stpcpy(p, LocalDomain);
     }
 
     /* Fill the DNS query packet */



More information about the Syslinux-commits mailing list