Fix IPv6 RDNSS writing to resolv.conf (buffer was too short)
authorSteven Barth <steven@midlink.org>
Tue, 19 Mar 2013 10:13:15 +0000 (11:13 +0100)
committerSteven Barth <steven@midlink.org>
Tue, 19 Mar 2013 10:13:15 +0000 (11:13 +0100)
interface-ip.c

index fc5a4a3aabfae0b945cd2f4a69b1963e57cfa1c8..21c603dfbbdf66b429fb1c87cb0fc481e2d5939d 100644 (file)
@@ -760,7 +760,7 @@ write_resolv_conf_entries(FILE *f, struct interface_ip_settings *ip)
        struct dns_server *s;
        struct dns_search_domain *d;
        const char *str;
-       char buf[32];
+       char buf[INET6_ADDRSTRLEN];
 
        vlist_simple_for_each_element(&ip->dns_servers, s, node) {
                str = inet_ntop(s->af, &s->addr, buf, sizeof(buf));