The right length to use when scanning all the data in a packet is the
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 16 Apr 2008 07:18:08 +0000 (07:18 +0000)
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 16 Apr 2008 07:18:08 +0000 (07:18 +0000)
commit69ee47a026bb2e3e33eeb09835516cd46d722354
treec164bfac192343015ccdd2d53e3ac578a180ee9e
parentc62023b58cec77c56e6bfc3d0c1f9f439647668e
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.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@25068 f5534014-38df-0310-8fa8-9805f1628bb7
epan/dissectors/packet-pana.c