diff options
author | Guy Harris <guy@alum.mit.edu> | 2003-12-24 11:07:03 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2003-12-24 11:07:03 +0000 |
commit | cde3ec1e3321cbc14dde35900148c7815f0eb801 (patch) | |
tree | 9c15df955847fc0b8baa702de238d17715721e5f /epan/proto.c | |
parent | 274520160aa68cfeaf752bc8e36fad3cdf5f4196 (diff) |
Let FT_PROTOCOL fields, if the length specified is -1, have a length of
0 - now that "tvb_ensure_length_remaining()" ensures that there's at
least one byte of data, we should use "tvb_length_remaining()" for
FT_PROTOCOL fields.
svn path=/trunk/; revision=9440
Diffstat (limited to 'epan/proto.c')
-rw-r--r-- | epan/proto.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/epan/proto.c b/epan/proto.c index 2a1ead0a1b..ab58045072 100644 --- a/epan/proto.c +++ b/epan/proto.c @@ -1,7 +1,7 @@ /* proto.c * Routines for protocol tree * - * $Id: proto.c,v 1.126 2003/12/06 06:09:12 gram Exp $ + * $Id: proto.c,v 1.127 2003/12/24 11:07:03 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -1956,6 +1956,9 @@ alloc_field_info(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, switch (hfinfo->type) { case FT_PROTOCOL: + *length = tvb_length_remaining(tvb, start); + break; + case FT_NONE: case FT_BYTES: case FT_STRING: |