diff options
author | Jeff Morriss <jeff.morriss@ulticom.com> | 2009-09-17 02:37:57 +0000 |
---|---|---|
committer | Jeff Morriss <jeff.morriss@ulticom.com> | 2009-09-17 02:37:57 +0000 |
commit | 6ea2688f23319b2e66274a1dfd764ebba538515c (patch) | |
tree | 77ba298a6c2064a16b980fc07f694c975d1150d2 /epan/dissectors/packet-edonkey.c | |
parent | e95fe3793382276eeb3532fcfec264137218d339 (diff) |
From zeemon via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3848 :
epan\dissectors\packet-edonkey.c
In the fuction dissect_emule_sourceOBFU(): the line
ti = proto_tree_add_item(tree, hf_emule_sourceOBFU, tvb, offset, 7 + ((settings & 0x08) ? 16 : 0), FALSE);
should be
ti = proto_tree_add_item(tree, hf_emule_sourceOBFU, tvb, offset, 7 + ((settings & 0x80) ? 16 : 0), FALSE);
and, the line:
if (settings & 0x08)
should be:
if (settings & 0x80)
That is, 0x08 should be revised to 0x80.
reference: the eMule0.49c source code, file PartFile.cpp, line 2730, in the
function CPartFile::AddSources().
svn path=/trunk/; revision=29957
Diffstat (limited to 'epan/dissectors/packet-edonkey.c')
-rw-r--r-- | epan/dissectors/packet-edonkey.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/epan/dissectors/packet-edonkey.c b/epan/dissectors/packet-edonkey.c index 7e9feeb485..45f734df3d 100644 --- a/epan/dissectors/packet-edonkey.c +++ b/epan/dissectors/packet-edonkey.c @@ -1018,7 +1018,7 @@ static int dissect_kademlia_hash_hidden(tvbuff_t *tvb, packet_info *pinfo _U_, else { g_snprintf(hash_part, sizeof(hash_part), "%08X", tvb_get_letohl(tvb, offset + i)); hash = g_strconcat(hash, hash_part, NULL); - } + } } /* <File hash> ::= HASH (16 word MD4 digest) */ @@ -1041,7 +1041,7 @@ static int dissect_kademlia_hash(tvbuff_t *tvb, packet_info *pinfo _U_, else { g_snprintf(hash_part, sizeof(hash_part), "%08X", tvb_get_letohl(tvb, offset + i)); hash = g_strconcat(hash, hash_part, NULL); - } + } } /* <File hash> ::= HASH (16 word MD4 digest) */ @@ -1063,7 +1063,7 @@ static int dissect_kademlia_tag_hash_hidden(tvbuff_t *tvb, packet_info *pinfo _U else { g_snprintf(hash_part, sizeof(hash_part), "%08X", tvb_get_letohl(tvb, offset + i)); hash = g_strconcat(hash, hash_part, NULL); - } + } } /* <File hash> ::= HASH (16 word MD4 digest) */ @@ -1085,7 +1085,7 @@ static int dissect_kademlia_tag_hash(tvbuff_t *tvb, packet_info *pinfo _U_, else { g_snprintf(hash_part, sizeof(hash_part), "%08X", tvb_get_letohl(tvb, offset + i)); hash = g_strconcat(hash, hash_part, NULL); - } + } } /* <File hash> ::= HASH (16 word MD4 digest) */ @@ -1243,14 +1243,14 @@ static int dissect_emule_sourceOBFU(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *sourceOBFU_tree; guint8 settings = tvb_get_guint8(tvb, offset+6); /* Add subtree for client info */ - ti = proto_tree_add_item(tree, hf_emule_sourceOBFU, tvb, offset, 7 + ((settings & 0x08) ? 16 : 0), FALSE); + ti = proto_tree_add_item(tree, hf_emule_sourceOBFU, tvb, offset, 7 + ((settings & 0x80) ? 16 : 0), FALSE); sourceOBFU_tree = proto_item_add_subtree(ti, ett_emule_sourceOBFU); proto_tree_add_item(sourceOBFU_tree, hf_edonkey_ip, tvb, offset, 4, FALSE); proto_tree_add_item(sourceOBFU_tree, hf_edonkey_port, tvb, offset+4, 2, TRUE); proto_tree_add_text(sourceOBFU_tree, tvb, offset+6, 1, "Obfuscation Settings: %u", settings); offset += 7; - if (settings & 0x08) + if (settings & 0x80) offset = dissect_edonkey_client_hash(tvb, pinfo, offset, sourceOBFU_tree); return offset; } @@ -2475,7 +2475,7 @@ static int dissect_kademlia_tag(tvbuff_t *tvb, packet_info *pinfo _U_, } break; case KADEMLIA_TAGTYPE_UINT32: - { + { guint32 value; /* show ip as dotted decimal */ switch( tag_type) { @@ -2647,7 +2647,7 @@ static int dissect_kademlia2_prolog( tvbuff_t *tvb, packet_info *pinfo _U_, { int kad_version; proto_item* ti; - + offset = dissect_kademlia_hash(tvb, pinfo, offset, tree, &hf_kademlia_peer_id); offset = dissect_kademlia_tcp_port(tvb, pinfo, offset, tree); @@ -2797,7 +2797,7 @@ static int dissect_kademlia_udp_message(guint8 msg_type, l = l-k; } else - binarray[j] = '0'; + binarray[j] = '0'; k = k/2; } } @@ -2889,7 +2889,7 @@ static int dissect_kademlia_udp_message(guint8 msg_type, i = taglist_size; j++; switch(type) { - case KADEMLIA_TAGTYPE_HASH: + case KADEMLIA_TAGTYPE_HASH: j += 16; break; case KADEMLIA_TAGTYPE_STRING: |