forked from osmocom/wireshark
From Chen Li via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8949 :
Fix the dissection of the port number in announce_peers request in BTDHT. svn path=/trunk/; revision=50899
This commit is contained in:
parent
a934ff953f
commit
effa86350a
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue