from Mark Phillips: the length field in the UDP header includes the
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Sat, 30 Oct 2004 10:04:35 +0000 (10:04 +0000)
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Sat, 30 Oct 2004 10:04:35 +0000 (10:04 +0000)
commitb971c162bada2d12e230b6cceea62810f72bc645
treef73b8b80d7e335e4e10fd632bcb18cd203d963b7
parent81f32f5add7dbb1e3c6438c0c4ff3d706e4672e3
from Mark Phillips: the length field in the UDP header includes the
length of the UDP header itself, so subtract the length of the header
when using it to limit the length of the payload tvbuff.

Clean up the computing of the captured length of the payload tvbuff (we
really should get rid of the "length" argument to "tvb_new_subset()",
and have it compute the captured length based on the supplied reported
length and the amount of that data actually present in the parent
tvbuff).

Don't fetch the length and checksum fields until we use them (so that we
don't throw an exception until then, and fail to process the source and
destination ports), and check whether the length is bogus regardless of
whether we're building a protocol tree or not.

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