Wireshark-dev: Re: [Wireshark-dev] How to use properly proto_field_is_referenced?
From: Jakub Zawadzki <darkjames-ws@xxxxxxxxxxxx>
Date: Thu, 14 Jun 2012 01:25:56 +0200
On Tue, May 08, 2012 at 11:20:37PM +0200, Jakub Zawadzki wrote:
> 3/ Malformed packets
> 
> We have special protocol "malformed" which gets added to tree when some exception occured, or protocol requested it with
> expert PI_MALFORMED group. It can be added to any tree, so we should also check for it in proto_field_is_referenced().
> 
> It's like 2/ but I'm pretty sure that right now not all malformed packet has proto_malformed added to tree.
> 
> IMHO in TRY_TO_FAKE_THIS_ITEM we should check if malformed_proto is referenced (i.e. used in filter), and if it is,
> we should try to fetch value from tvb (which might throw exception).

FYI, also reported in bug #3290 [1], fix was proposed in attachment #2849 [2]

[1] https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3290
[2] https://bugs.wireshark.org/bugzilla/attachment.cgi?id=2849