Wireshark-bugs: [Wireshark-bugs] [Bug 9120] Buildbot crash output: fuzz-2013-09-08-32595.pcap

Date: Tue, 24 Sep 2013 13:40:11 +0000

Comment # 12 on bug 9120 from
(In reply to comment #11)
> (In reply to comment #10)
> > Ya, I was thinking of adding a stack of proto_id values that is maintained
> > like (or instead of) layer_names even when !tree so that dissectors can do
> > something like
> > 
> > if (pinfo->protocols[top] == proto_tcp) do stuff
> > else if (pinfo->protocols[top] == proto_udp) do stuff
> 
> The dissector would the need to populate proto_xx I suppose and do
> if (pinfo->protocols[top-1] I suppose as top would point to the current
> dissector.

There is some code to update the layer_names in proto.c that we could adapt to
avoid touching every dissector. You're right on the top-1 bit.

> I was thinking of the struct that may be passed trough:
> >the (relatively new) 'data' parameter to dissector_try_uint_new(), >call_dissector_only(), dissector_try_heuristic() and others.
> 
> As it might suffer from the same type of problem.

We have at least two different ways of passing void pointers around
(pinfo->private_data, data parameter to new dissector calls). Giving a general
way to identify the parent protocol would make both of those safer.


You are receiving this mail because:
  • You are watching all bug changes.