aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-pcp.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2016-08-22 00:37:42 -0700
committerGuy Harris <guy@alum.mit.edu>2016-08-22 07:38:15 +0000
commite83bdc67cc413c25321ae75792a2c92d55b6e544 (patch)
tree76d7b2c57dd782631db01c02a488c23d3661d11c /epan/dissectors/packet-pcp.c
parentc00ea6f26e3c83e1db144d9d858cf9c4662d7e19 (diff)
wmem_array_index() returns a *pointer* to the array element.
The array is an array of guint8 *'s that point to strings; wmem_array_index() doesn't return a pointer to the string, it returns a pointer to a pointer to the string, and you have to dereference the result of the wmem_array_index() call to get a pointer to the string. Change-Id: I8c7b3320f0979b01383ad255419c21cdeb7df4c7 Reviewed-on: https://code.wireshark.org/review/17221 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/dissectors/packet-pcp.c')
-rw-r--r--epan/dissectors/packet-pcp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/dissectors/packet-pcp.c b/epan/dissectors/packet-pcp.c
index 9c742f176a..5beaed5a8e 100644
--- a/epan/dissectors/packet-pcp.c
+++ b/epan/dissectors/packet-pcp.c
@@ -617,7 +617,7 @@ static void create_pmid_to_name_map_from_candidates(pcp_conv_info_t *pcp_conv_in
guint8 *pmid_name;
pmid = tvb_get_ntohl(tvb, offset);
- pmid_name = (guint8 *)wmem_array_index(pcp_conv_info->pmid_name_candidates, i);
+ pmid_name = *(guint8 **)wmem_array_index(pcp_conv_info->pmid_name_candidates, i);
if(wmem_map_lookup(pcp_conv_info->pmid_to_name, GINT_TO_POINTER(pmid)) == NULL) {
wmem_map_insert(pcp_conv_info->pmid_to_name, GINT_TO_POINTER(pmid), pmid_name);