s4-ipv6: fixed a crash in the IPv6 DNS code
authorAndrew Tridgell <tridge@samba.org>
Tue, 7 Jun 2011 04:10:38 +0000 (14:10 +1000)
committerAndrew Tridgell <tridge@samba.org>
Tue, 7 Jun 2011 05:48:42 +0000 (15:48 +1000)
source4/libcli/resolve/dns_ex.c

index cb2d2c3d2cee3e0cf48d205ae1cb18192c5590f7..1d56a4b4d5cdbbeb5d4b24b376b17781b886be47 100644 (file)
@@ -267,7 +267,7 @@ static void run_child_dns_lookup(struct dns_ex_state *state, int fd)
                        port = state->port;
                }
 
-               switch (rr->type) {
+               switch (addrs_rr[i]->type) {
                case rk_ns_t_a:
                        if (inet_ntop(AF_INET, addrs_rr[i]->u.a,
                                      addrstr, sizeof(addrstr)) == NULL) {