aboutsummaryrefslogtreecommitdiffstats
path: root/packet-mpeg1.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-mpeg1.c
parenta9f7ef50586b671e402cf24f7175d07e18e0f180 (diff)
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-mpeg1.c')
-rw-r--r--packet-mpeg1.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/packet-mpeg1.c b/packet-mpeg1.c
index a9c38358f4..ba5a14dfe1 100644
--- a/packet-mpeg1.c
+++ b/packet-mpeg1.c
@@ -2,7 +2,7 @@
*
* Routines for RFC 2250 MPEG-1 dissection
*
- * $Id: packet-mpeg1.c,v 1.6 2002/01/24 09:20:49 guy Exp $
+ * $Id: packet-mpeg1.c,v 1.7 2002/02/01 04:34:15 gram Exp $
*
* Copyright 2001,
* Francisco Javier Cabello Torres, <fjcabello@vtools.es>
@@ -192,7 +192,7 @@ dissect_mpeg1( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree )
offset += 1;
/* The rest of the packet is the MPEG-1 stream */
- proto_tree_add_item( mpg_tree, hf_rtp_mpg_data, tvb, offset, tvb_length_remaining( tvb, offset ), FALSE );
+ proto_tree_add_item( mpg_tree, hf_rtp_mpg_data, tvb, offset, -1, FALSE );
}
}