Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: Re: [Wireshark-dev] dissector bug

From: "Jaap Keuter" <jaap.keuter@xxxxxxxxx>
Date: Mon, 31 Aug 2009 09:14:41 +0200
> While trying to add an item in the proto tree using the command
>
> proto_tree_add_item(xyz_tree, hf_xyz_event_stream_id, tvb, offset + 2, -1,
> FALSE);
>
> I am getting the following error:
>
> [Dissector bug, protocol XYZ: proto.c:3009: failed assertion
> "DISSECTOR_ASSERT_NOT_REACHED"]
>
> But strangely this is not the case with proto_tree_add_text (it is runing
> successfully). The field hf_xyz_event_stream is registerd with FT_DOUBLE.
> I
> have also tried it out with FT_UINT.
>
> what circumstances may cause this error ??
>
> Kindly explain
> --
> Regards

Hi,

when adding an item it must have a size matching the type you defined.
You've used -1, meaning until the end of the buffer. That is not a size
that matches the fieldtype, hence is not accepted.

Thanx,
Jaap
> Devlina
> ___________________________________________________________________________
> Sent via:    Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
> Archives:    http://www.wireshark.org/lists/wireshark-dev
> Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
>              mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe