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>
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);