From 49466f95bc1fe3cc139f3750fcc934ffc210faef Mon Sep 17 00:00:00 2001 From: Jeff Morriss Date: Sun, 2 Dec 2012 04:49:13 +0000 Subject: Introduce, and start using, TVB_SET_ADDRESS() and TVB_SET_ADDRESS_HF(). They are like the non-TVB versions except that they take a TVB and an offset instead of (frequently) a pointer into the TVB. Calling tvb_get_ptr() before modifying the rest of the fields should help fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7960 (though I can't reproduce that problem). Replace a bunch of calls like: SET_ADDRESS(..., AT_XXX, length, tvb_get_ptr(tvb, offset, length)); with: TVB_SET_ADDRESS(..., AT_XXX, tvb, offset, length); svn path=/trunk/; revision=46324 --- epan/dissectors/packet-vuze-dht.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'epan/dissectors/packet-vuze-dht.c') diff --git a/epan/dissectors/packet-vuze-dht.c b/epan/dissectors/packet-vuze-dht.c index a8857485bd..c0ee58c2fb 100644 --- a/epan/dissectors/packet-vuze-dht.c +++ b/epan/dissectors/packet-vuze-dht.c @@ -300,11 +300,11 @@ dissect_vuze_dht_address(tvbuff_t *tvb, packet_info _U_*pinfo, proto_tree *tree, { case TL_IPv4: proto_tree_add_item(sub_tree, hf_vuze_dht_address_v4, tvb, offset, ip_length, ENC_BIG_ENDIAN); - SET_ADDRESS( &addr, AT_IPv4, ip_length, tvb_get_ptr( tvb, offset, ip_length) ); + TVB_SET_ADDRESS( &addr, AT_IPv4, tvb, offset, ip_length); break; case TL_IPv6: proto_tree_add_item(sub_tree, hf_vuze_dht_address_v6, tvb, offset, ip_length, ENC_NA); - SET_ADDRESS( &addr, AT_IPv6, ip_length, tvb_get_ptr( tvb, offset, ip_length) ); + TVB_SET_ADDRESS( &addr, AT_IPv6, tvb, offset, ip_length); break; default: addr.type = AT_NONE; -- cgit v1.2.3