Use SET_ADDRESS() to initialize src and dst as both src.hf and dst.hf were uninitialized. Fixes Coverity CID's 752013-752014: Uninitialized scalar variable.

svn path=/trunk/; revision=47070
This commit is contained in:
Chris Maynard 2013-01-14 16:55:07 +00:00
parent de91f3638b
commit fc9663740e
1 changed files with 2 additions and 4 deletions

View File

@ -50,10 +50,8 @@ ipv6_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, con
address dst;
/* Addresses aren't implemented as 'address' type in struct ip6_hdr */
src.type = dst.type = AT_IPv6;
src.len = dst.len = sizeof(struct e_in6_addr);
src.data = &ip6h->ip6_src;
dst.data = &ip6h->ip6_dst;
SET_ADDRESS(&src, AT_IPv6, sizeof(struct e_in6_addr), &ip6h->ip6_src);
SET_ADDRESS(&dst, AT_IPv6, sizeof(struct e_in6_addr), &ip6h->ip6_dst);
add_hostlist_table_data(hosts, &src, 0, TRUE, 1, pinfo->fd->pkt_len, SAT_NONE, PT_NONE);
add_hostlist_table_data(hosts, &dst, 0, FALSE, 1, pinfo->fd->pkt_len, SAT_NONE, PT_NONE);