Patch from Lee Berger to properly skip past the length in FT_UINT_STRING

data objects if the length isn't 1.

svn path=/trunk/; revision=3821
This commit is contained in:
Guy Harris 2001-08-04 19:57:30 +00:00
parent e5474282c1
commit 74262f37de
3 changed files with 8 additions and 3 deletions

View File

@ -751,6 +751,10 @@ Markus Seehofer <mseehofe[AT]nt.hirschmann.de> {
GMRP support
}
Lee Berger <lberger[AT]roy.org> {
Fix to FT_UINT_STRING handling
}
Alain Magloire <alainm[AT]rcsm.ece.mcgill.ca> was kind enough to
give his permission to use his version of snprintf.c.

View File

@ -1149,6 +1149,7 @@ B<http://www.ethereal.com>.
David Eisner <cradle[AT]Glue.umd.edu>
Steve Dickson <steved[AT]talarian.com>
Markus Seehofer <mseehofe[AT]nt.hirschmann.de>
Lee Berger <lberger[AT]roy.org>
Alain Magloire <alainm[AT]rcsm.ece.mcgill.ca> was kind enough to give his
permission to use his version of snprintf.c.

View File

@ -1,7 +1,7 @@
/* proto.c
* Routines for protocol tree
*
* $Id: proto.c,v 1.31 2001/08/01 08:27:00 guy Exp $
* $Id: proto.c,v 1.32 2001/08/04 19:57:30 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -542,11 +542,11 @@ proto_tree_add_item(proto_tree *tree, int hfindex, tvbuff_t *tvb,
case FT_UINT_STRING:
/* This g_strdup'ed memory is freed in proto_tree_free_node() */
n = get_uint_value(tvb, start, length, little_endian);
proto_tree_set_string_tvb(new_fi, tvb, start + 1, n);
proto_tree_set_string_tvb(new_fi, tvb, start + length, n);
/* Instead of calling proto_item_set_len(), since we don't yet
* have a proto_item, we set the field_info's length ourselves. */
new_fi->length = n + 1;
new_fi->length = n + length;
break;
default:
g_error("new_fi->hfinfo->type %d (%s) not handled\n",