diff options
Diffstat (limited to 'com32/lib/syslinux/pxe_dns.c')
| -rw-r--r-- | com32/lib/syslinux/pxe_dns.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/com32/lib/syslinux/pxe_dns.c b/com32/lib/syslinux/pxe_dns.c index 9ab95137..6620396f 100644 --- a/com32/lib/syslinux/pxe_dns.c +++ b/com32/lib/syslinux/pxe_dns.c @@ -48,21 +48,26 @@ uint32_t pxe_dns(const char *hostname) unsigned char b[4]; uint32_t ip; } q; + char *lm_hostname; /* Is this a dot-quad? */ if (sscanf(hostname, "%hhu.%hhu.%hhu.%hhu", &q.b[0], &q.b[1], &q.b[2], &q.b[3]) == 4) return q.ip; + lm_hostname = lstrdup(hostname); + if (!lm_hostname) + return 0; + memset(®s, 0, sizeof regs); regs.eax.w[0] = 0x0010; - regs.es = SEG(__com32.cs_bounce); - regs.ebx.w[0] = OFFS(__com32.cs_bounce); - - strcpy((char *)__com32.cs_bounce, hostname); + regs.es = SEG(lm_hostname); + /* regs.ebx.w[0] = OFFS(lm_hostname); */ __intcall(0x22, ®s, ®s); + lfree(lm_hostname); + if (regs.eflags.l & EFLAGS_CF) return 0; |
