#45: use static buffer

This commit is contained in:
Erik Ekman 2009-02-22 14:35:18 +00:00
parent a3cea72400
commit 9354697975

View file

@ -927,7 +927,9 @@ get_resolvconf_addr()
ret = GetNetworkParams(fixed_info, &buflen);
if (ret == NO_ERROR) {
rv = fixed_info->DnsServerList.IpAddress.String;
strncpy(addr, fixed_info->DnsServerList.IpAddress.String, sizeof(addr));
addr[15] = 0;
rv = addr;
}
#endif
return rv;