Wireshark-commits: [Wireshark-commits] rev 25068: /trunk/epan/dissectors/ /trunk/epan/dissectors/:

Date: Wed, 16 Apr 2008 07:18:11 GMT
http://anonsvn.wireshark.org/viewvc/viewvc.cgi?view=rev&revision=25068

User: guy
Date: 2008/04/16 07:18 AM

Log:
 The right length to use when scanning all the data in a packet is the
 *reported* length, so that if the packet was cut short by a snapshot
 length, we get an exception because we run past the end, and the packet
 is marked as having been cut short.
 
 Do not use DISSECTOR_ASSERT() to check for the validity of packet data;
 dissectors should try to handle even malformed packets, they shouldn't
 report malformed packets as dissector bugs (if DISSECTOR_ASSERT(), that
 is *ipso facto* evidence of a dissector bug, *even if the packet is
 malformed*).
 
 Update the offset when scanning the packet even if we *aren't* building
 the protocol tree.

Directory: /trunk/epan/dissectors/
  Changes    Path             Action
  +50 -26    packet-pana.c    Modified