From 13a5b7c2db8a33e70b24540444d07db9ce2e2487 Mon Sep 17 00:00:00 2001 From: Erik Ekman Date: Sun, 22 Feb 2009 14:35:18 +0000 Subject: [PATCH] #45: use static buffer --- src/iodine.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/iodine.c b/src/iodine.c index 1e6b94b..9ffa3c0 100644 --- a/src/iodine.c +++ b/src/iodine.c @@ -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;