Does this patch help? If not, I would consider blaming guids_add_guid for not initializing the key member of the emem_tree_key_t structure. Even though I think either would be caught by the DISSECTOR_ASSERT_NOT_REACHED macro. Also, are there warning for emem_tree_lookup32_array() as well?
-----Original Message-----
From: Jeff Morriss <jeff.morriss.ws@xxxxxxxxx>
To: wireshark-dev <wireshark-dev@xxxxxxxxxxxxx>
Sent: Thu, Aug 9, 2012 4:06 pm
Subject: Re: [Wireshark-dev] [Wireshark-commits] rev 44380: /trunk/epan/ /trunk/epan/: emem.c
Index: epan/emem.c
===================================================================
--- epan/emem.c (revision 44392)
+++ epan/emem.c (working copy)
@@ -1869,8 +1869,7 @@
emem_tree_insert32_array(emem_tree_t *se_tree, emem_tree_key_t *key, void *data)
{
int key_count = 0;
- emem_tree_key_t *local_key = key,
- *copy_key;
+ emem_tree_key_t *local_key = key;
if((key[0].length<1)||(key[0].length>100)){
DISSECTOR_ASSERT_NOT_REACHED();
@@ -1882,19 +1881,7 @@
local_key++;
}
- copy_key = ep_alloc(sizeof(emem_tree_key_t)*(key_count+1));
- local_key = copy_key;
- while ((key->key != NULL) && (key->length != 0)) {
- copy_key->length = key->length;
- copy_key->key = key->key;
- key++;
- copy_key++;
- }
-
- /* "NULL terminate" the key */
- copy_key->length = 0;
- copy_key->key = NULL;
-
+ local_key = ep_memdup(key, sizeof(emem_tree_key_t)*(key_count+1));
emem_tree_insert32_array_local(se_tree, local_key, data);
}