From 24f02dafcd80a10558bf5afeed07a0989a6d7cc6 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Sat, 11 Jun 2016 18:59:25 -0700 Subject: Add checks to address setting routines. Fail if: 1) you have an AT_NONE address with data; 2) you have a non-AT_NONE address with a zero length and a non-null data pointer, or with a non-zero length and a null data pointer. When comparing addresses for equality, just make sure the types are the same, the lengths are the same and, if the lengths are non-zero, the data is the same; don't treat AT_NONE specially - the "lengths are non-zero" check will make sure we do the right thing. Make sure when we create an AT_NONE address it has a zero length and null data pointer. Change-Id: I5c452ef0d140c2d9aef3004f1cfd124a95b78fb2 Reviewed-on: https://code.wireshark.org/review/15839 Reviewed-by: Guy Harris --- ui/voip_calls.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'ui/voip_calls.c') diff --git a/ui/voip_calls.c b/ui/voip_calls.c index 55f54a542f..ca80ce4368 100644 --- a/ui/voip_calls.c +++ b/ui/voip_calls.c @@ -1989,8 +1989,7 @@ h225_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *edt, tmp_h323info->guid = (e_guid_t *)g_memdup(&pi->guid, sizeof pi->guid); DUMP_PTR1(tmp_h323info->guid); - tmp_h323info->h225SetupAddr.type = AT_NONE; - tmp_h323info->h225SetupAddr.len = 0; + clear_address(&tmp_h323info->h225SetupAddr); tmp_h323info->h245_list = NULL; tmp_h323info->is_faststart_Setup = FALSE; tmp_h323info->is_faststart_Proc = FALSE; -- cgit v1.2.1