Wireshark-dev: [Wireshark-dev] Problems with *next for proto_node
From: Bryce Jensen <[email protected]>
Date: Wed, 14 Sep 2016 15:32:55 -0700

I wanted to try and modify the elements of a bitmask for the purpose of dynamically changing the elements for a custom dissector.  I used proto_tree_add_bitmask to kick off the process of building the proto_item (ti in my case).  I found that I could access ti->first_child and manipulate the contents via proto_item_set_text.  However, when I tried to access it->first_child->next I get segmentation faults, even if I check to see if it is NULL.  I did some experimentation around ->next for proto_item and got consistent segmentation faults.  Not the behaviour I was expecting, is this a bug or do I misunderstand the purpose of next in this context?

 

Regards,


Bryce