Wireshark-dev: Re: [Wireshark-dev] DISSECTOR_ASSERT_NOT_REACHED in WLCCP decode...
From: Jeff Morriss <jeff.morriss@xxxxxxxxxxx>
Date: Tue, 29 May 2007 12:56:20 +0800


Kevin A. Noll wrote:

I think I've figured out that I am getting the DISSECTOR_ASSERT because of
something related to the dissector being near the end of the tvbuff.
However, I've tried several things to try to debug exactly what occuring,
but I can't get the error to go away.

This error occurs when I am reading a structure from tvb with
proto_tree_add_item:

guint16 mic_length=0;

mic_length = tvb_get_ntohs(tvb, tlv_offset);
tlv_offset += 2;

proto_tree_add_item(tlv_tree, hf_wlccp_mic_value, tvb, tlv_offset,
mic_length, FALSE);

Where hf_wlccp_mic_value is defined as:

{ &hf_wlccp_mic_value, {"MIC Value", "wlccp.mic_value", FT_UINT_BYTES, BASE_DEC, NULL, 0, "MIC value", HFILL }
}


I get the error even if I set the value of mic_length to something I know
does not overrun the end of tvb.

I would greatly appreciate any suggestions on how to fix my error.

Any chance of getting a core and thus a backtrace?  That might be faster.

You might also try changing BASE_DEC to BASE_HEX: I'm not sure UINT_BYTES can be displayed in decimal (bug 1539 talks about a vaguely similar issue).