Text   |  XML   |  ReML   |   Visible Warnings:

Uninitialized Variable  at proto.c:2145

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

dissect_header

(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-synphasor.c)expand/collapse
Show more  
 658  static gint dissect_header(tvbuff_t *tvb, proto_tree *tree)
 659  {
 660          proto_tree *temp_tree;
 661          proto_item *temp_item;
 662   
 663          gint    offset = 0;
 664          guint16 framesize, idcode;
 665   
 666          /* SYNC and flags */
 667          temp_item = proto_tree_add_item(tree, hf_sync, tvb, offset, 2, FALSE);
 668          temp_tree = proto_item_add_subtree(temp_item, ett_frtype);
 669                  proto_tree_add_item(temp_tree, hf_sync_frtype,  tvb, offset, 2, FALSE);
 670                  proto_tree_add_item(temp_tree, hf_sync_version, tvb, offset, 2, FALSE);
 671          offset += 2;
 672   
 673          /* FRAMESIZE */
 674          proto_tree_add_item(tree, hf_frsize, tvb, offset, 2, FALSE);
 675          framesize = tvb_get_ntohs(tvb, offset); offset += 2;
 676   
 677          /* IDCODE */
 678          proto_tree_add_item(tree, hf_idcode, tvb, offset, 2, FALSE);
 679          idcode = tvb_get_ntohs(tvb, offset); offset += 2;
 680   
 681          /* SOC */
 682          {
 683                  /* can't use 'proto_tree_add_time()' because we need UTC */
 684                  char   buf[20];
 685                  struct tm* t;
 686                  time_t soc = tvb_get_ntohl(tvb, offset);
 687                  t = gmtime(&soc);
 688                  strftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S", t);
 689[+]                 proto_tree_add_string(tree, hf_soc, tvb, offset, 4, buf);
expand/collapse

proto_tree_add_string

(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/proto.c)expand/collapse
Show more  
 2039  proto_item *
 2040  proto_tree_add_string(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
 2041                  gint length, const char* value)
 2042  {
 2043          proto_item              *pi;
 2044          field_info              *new_fi;
 2045          header_field_info       *hfinfo;
 2046   
 2047          if (!tree)
 2048                  return (NULL);
 2049   
 2050          TRY_TO_FAKE_THIS_ITEM(tree, hfindex);
 2051   
 2052          PROTO_REGISTRAR_GET_NTH(hfindex, hfinfo);
 2053          DISSECTOR_ASSERT(hfinfo->type == FT_STRING || hfinfo->type == FT_STRINGZ);
 2054   
 2055[+]         pi = proto_tree_add_pi(tree, hfindex, tvb, start, &length, &new_fi);
 2056          DISSECTOR_ASSERT(length >= 0);
 2057[+]         proto_tree_set_string(new_fi, value);
expand/collapse

proto_tree_set_string

(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/proto.c)expand/collapse
Show more  
 2141  proto_tree_set_string(field_info *fi, const char* value)
 2142  {
 2143          if (value) {
 2144                  col_custom_set_fstr(fi->hfinfo, "%s",
 2145                                      format_text(value, strlen(value)));
Show more  
Show more  
Show more  




Change Warning 3006.32105 : Uninitialized Variable

Priority:
State:
Finding:
Owner:
Note: