Wireshark-dev: Re: [Wireshark-dev] wireshark assertion issue
From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Mon, 23 Nov 2009 13:02:50 -0800

On Nov 22, 2009, at 11:20 PM, Rach, Darshan wrote:

Doing this way, I am getting a DISSECTOR BUG.

("idx >= 0" failed in proto_item_add_subtree())

Kindly help what might have gone wrong?

You passed a negative number as the second argument to proto_item_add_subtree() - or something you called did, such as process_reassembled_data().

Those numbers are usually initialized in a call to proto_register_subtree_array(); you pass proto_register_subtree_array() a pointer to the first element of an array of pointers to variables to initialize, and the number of elements in the array.

The first two elements of your msg_frag_items structure are pointers to numbers that get passed to proto_item_add_subtree(); make sure pointers to them are also in the array you passed to proto_register_subtree_array().