Wireshark-commits: [Wireshark-commits] rev 48940: /trunk/epan/ /trunk/epan/dissectors/: packet-clnp
http://anonsvn.wireshark.org/viewvc/viewvc.cgi?view=rev&revision=48940
User: guy
Date: 2013/04/19 07:53 PM
Log:
When we're dissecting the beginning of a fragmented packet that we
haven't reassembled, we're probably moving sequentially through the
packet, which means that we'll run past the end of the fragment rather
than past the end of what would have been the reassembled packet had we
reassembled it.
I.e., there's little reason to care whether we're past the end of the
fragment but not past the end of the packet, or whether we're past the
end of the packet; in either case, we're past the end of the fragment,
and if somebody wants to know whether the packet is malformed by
stopping short of certain fields, they should enable reassembly.
So we get rid of the explicit fragment length in tvbuffs and, instead,
have a "this is a fragment" flag; if that flag is set, we throw
FragmentBoundsError rather than ReportedBoundsError if we run past the
end of the reported data.
(This also means we could flag the tvbuff even if we don't know how
large the reassembled packet will be, e.g. when doing IP reassembly.)
Replace tvb_new_subset_length_fragment() with tvb_new_subset_length()
and a new "set the "this is a fragment flag"" routine.
Directory: /trunk/epan/dissectors/
Changes Path Action
+8 -4 packet-clnp.c Modified
Directory: /trunk/epan/
Changes Path Action
+6 -6 tvbuff-int.h Modified
+57 -105 tvbuff.c Modified
+13 -19 tvbuff.h Modified