aboutsummaryrefslogtreecommitdiffstats
path: root/packet-h261.c
diff options
context:
space:
mode:
authorGilbert Ramirez <gram@alumni.rice.edu>2002-02-01 04:34:17 +0000
committerGilbert Ramirez <gram@alumni.rice.edu>2002-02-01 04:34:17 +0000
commitbd4a9c13eb557b93f3e80f2c66226cbfe6082a82 (patch)
tree65878dfe4ebb3e9f077e408a572bc9227a524ded /packet-h261.c
parenta9f7ef50586b671e402cf24f7175d07e18e0f180 (diff)
downloadwireshark-bd4a9c13eb557b93f3e80f2c66226cbfe6082a82.tar.gz
wireshark-bd4a9c13eb557b93f3e80f2c66226cbfe6082a82.tar.bz2
wireshark-bd4a9c13eb557b93f3e80f2c66226cbfe6082a82.zip
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. svn path=/trunk/; revision=4656
Diffstat (limited to 'packet-h261.c')
-rw-r--r--packet-h261.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/packet-h261.c b/packet-h261.c
index 8e5e5a7982..cd75117f69 100644
--- a/packet-h261.c
+++ b/packet-h261.c
@@ -2,7 +2,7 @@
*
* Routines for ITU-T Recommendation H.261 dissection
*
- * $Id: packet-h261.c,v 1.13 2002/01/29 17:18:06 gram Exp $
+ * $Id: packet-h261.c,v 1.14 2002/02/01 04:34:15 gram Exp $
*
* Copyright 2000, Philips Electronics N.V.
* Andreas Sikkema <andreas.sikkema@philips.com>
@@ -117,7 +117,7 @@ dissect_h261( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree )
offset++;
/* The rest of the packet is the H.261 stream */
- proto_tree_add_item( h261_tree, hf_h261_data, tvb, offset, tvb_length_remaining( tvb, offset ), FALSE );
+ proto_tree_add_item( h261_tree, hf_h261_data, tvb, offset, -1, FALSE );
}
}