diff options
author | João Valverde <joao.valverde@tecnico.ulisboa.pt> | 2015-11-26 04:44:52 +0000 |
---|---|---|
committer | João Valverde <j@v6e.pt> | 2016-02-26 23:09:43 +0000 |
commit | e4c059f67f3b29bcc26b1faf111bf647ac630e04 (patch) | |
tree | 8ec634d7614f7a32c09c5cdb60d7509fc2dd2208 /epan/dissectors/packet-isakmp.c | |
parent | 92537916483ec721a638cdd7c416d099a45a9304 (diff) |
Add free_address_wmem(), fix warnings [-Wcast-qual]
Try to improve address API and also fix some constness warnings
by not overloading the 'data' pointer to store malloc'ed buffers
(use private pointer for that instead).
Second try, now passing test suite.
Change-Id: Idc101cd866b6d4f13500c9d59da5c7a38847fb7f
Reviewed-on: https://code.wireshark.org/review/13946
Petri-Dish: João Valverde <j@v6e.pt>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
Diffstat (limited to 'epan/dissectors/packet-isakmp.c')
-rw-r--r-- | epan/dissectors/packet-isakmp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/dissectors/packet-isakmp.c b/epan/dissectors/packet-isakmp.c index 6cfd973e2b..e29e680ab5 100644 --- a/epan/dissectors/packet-isakmp.c +++ b/epan/dissectors/packet-isakmp.c @@ -2878,7 +2878,7 @@ dissect_isakmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _ #ifdef HAVE_LIBGCRYPT if (isakmp_version == 1) { - set_address(&null_addr, AT_NONE, 0, NULL); + clear_address(&null_addr); tvb_memcpy(tvb, i_cookie, offset, COOKIE_SIZE); decr = (decrypt_data_t*) g_hash_table_lookup(isakmp_hash, i_cookie); @@ -2888,7 +2888,7 @@ dissect_isakmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _ decr = (decrypt_data_t *)g_slice_alloc(sizeof(decrypt_data_t)); memcpy(ic_key, i_cookie, COOKIE_SIZE); memset(decr, 0, sizeof(decrypt_data_t)); - set_address(&decr->initiator, AT_NONE, 0, NULL); + clear_address(&decr->initiator); g_hash_table_insert(isakmp_hash, ic_key, decr); } |