Repository: trafficserver Updated Branches: refs/heads/master f68e950f3 -> 89606cb54
TS-3942: Crash when enumerating HostDB records in HostDB UI Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/89606cb5 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/89606cb5 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/89606cb5 Branch: refs/heads/master Commit: 89606cb540b026cc238adf78f393221335d69599 Parents: f68e950 Author: Brian Geffon <bri...@apache.org> Authored: Thu Sep 24 00:49:30 2015 -0700 Committer: Brian Geffon <bri...@apache.org> Committed: Thu Sep 24 00:49:30 2015 -0700 ---------------------------------------------------------------------- iocore/hostdb/HostDB.cc | 3 +++ 1 file changed, 3 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/89606cb5/iocore/hostdb/HostDB.cc ---------------------------------------------------------------------- diff --git a/iocore/hostdb/HostDB.cc b/iocore/hostdb/HostDB.cc index 984d137..eb5b541 100644 --- a/iocore/hostdb/HostDB.cc +++ b/iocore/hostdb/HostDB.cc @@ -1598,6 +1598,7 @@ HostDBContinuation::dnsEvent(int event, HostEnt *e) item.md5_low = r->md5_low; item.md5_low_low = r->md5_low_low; item.full = 1; + item.hostname_offset = 0; item.app.allotment.application1 = 0; item.app.allotment.application2 = 0; @@ -1623,6 +1624,7 @@ HostDBContinuation::dnsEvent(int event, HostEnt *e) for (ii = 0; ii < nn; ++ii) { if (is_addr_valid(af, e->ent.h_addr_list[ii])) { HostDBInfo &item = rr_data->info[i]; + memset(&item, 0, sizeof(item)); ip_addr_set(item.ip(), af, e->ent.h_addr_list[ii]); item.full = 1; item.round_robin = 0; @@ -1632,6 +1634,7 @@ HostDBContinuation::dnsEvent(int event, HostEnt *e) item.md5_high = r->md5_high; item.md5_low = r->md5_low; item.md5_low_low = r->md5_low_low; + item.hostname_offset = 0; if (!restore_info(&item, old_r, old_info, old_rr_data)) { item.app.allotment.application1 = 0; item.app.allotment.application2 = 0;