Text   |  XML   |  ReML   |   Visible Warnings:

Useless Assignment  at packet-edonkey.c:1038

No properties have been set. | edit properties
Jump to warning location ↓ warning details...
Show Events | Options

dissect_kademlia_hash

(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-edonkey.c)expand/collapse
Show more  
 1032  static int dissect_kademlia_hash(tvbuff_t *tvb, packet_info *pinfo _U_,
 1033                                   int offset, proto_tree *tree, int *value_ptr) {
 1034      char *hash = ep_alloc(33);
 1035      char hash_part[9];
 1036      int i = 0;
 1037   
 1038      for (i=0; i<=12; i+=4) {
 1039        if (i == 0)
 1040          g_snprintf(hash, 33, "%08X", tvb_get_letohl(tvb, offset));
 1041        else {
 1042          g_snprintf(hash_part, sizeof(hash_part), "%08X", tvb_get_letohl(tvb, offset + i));
 1043          hash = g_strconcat(hash, hash_part, NULL);
 1044        }        
 1045      }
 1046   
 1047      /* <File hash> ::= HASH (16 word MD4 digest) */
 1048      proto_tree_add_string_format_value(tree, *value_ptr, tvb, offset, 16, hash, "%s", hash);
 1049   
 1050      return dissect_kademlia_hash_hidden(tvb, pinfo, offset, tree);
 1051  }
Show more  




Change Warning 2339.31473 : Useless Assignment

Priority:
State:
Finding:
Owner:
Note: