Provide tvb_ensure_length_remaining(), which is like
authorgram <gram@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 1 Feb 2002 04:34:17 +0000 (04:34 +0000)
committergram <gram@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 1 Feb 2002 04:34:17 +0000 (04:34 +0000)
commitcaea2d0e0e122b2bc971a922f502ac6fd8cf1118
tree65878dfe4ebb3e9f077e408a572bc9227a524ded
parenta64e527e76bc83b5d0514307cac94f85598f3b29
Provide tvb_ensure_length_remaining(), which is like
tvb_length_remaining() except that it throws BoundsError if 'offset'
is out-of-bounds.

Allow a length argument of -1 for FT_STRING and FT_BYTES fields
in proto_tree_add_item().

Change some dissectors to either use -1 for the length argument in
calls to proto_tree_add_item(), or call tvb_ensure_length_remaining()
instead of tvb_length_remaining(), or to check the return-value
of tvb_length_remaining(). Changes to more dissectors are necessary,
but will follow later.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4656 f5534014-38df-0310-8fa8-9805f1628bb7
epan/proto.c
epan/tvbuff.c
epan/tvbuff.h
packet-afs.c
packet-auto_rp.c
packet-beep.c
packet-eigrp.c
packet-h261.c
packet-isup.c
packet-mpeg1.c
packet-tns.c