Fix the dissection of the port number in announce_peers request in BTDHT.

svn path=/trunk/; revision=50899
This commit is contained in:
Jeff Morriss 2013-07-26 00:24:54 +00:00
parent a934ff953f
commit effa86350a
1 changed files with 3 additions and 4 deletions

View File

@ -142,16 +142,15 @@ dissect_bencoded_int(tvbuff_t *tvb, packet_info _U_*pinfo, proto_tree *tree, gui
{
guint start_offset;
start_offset = offset;
/* we have confirmed that the first byte is 'i' */
offset += 1;
start_offset = offset;
while( tvb_get_guint8(tvb,offset)!='e' )
offset += 1;
*result = tvb_get_ephemeral_string( tvb, offset, offset-start_offset-1 );
proto_tree_add_string_format( tree, hf_bencoded_int, tvb, offset, offset-start_offset-1, *result,
*result = tvb_get_ephemeral_string( tvb, start_offset, offset-start_offset);
proto_tree_add_string_format( tree, hf_bencoded_int, tvb, start_offset, offset-start_offset, *result,
"%s: %s", label, *result );
offset += 1;