Text   |  XML   |  ReML   |   Visible Warnings:

Uninitialized Variable  at to_str.c:916

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

acn_add_address

(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-acn.c)expand/collapse
Show more  
 459  acn_add_address(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset, const char *label)
 460  {
 461    proto_item *pi;
 462    proto_tree *addr_tree = NULL;
 463    guint8 ip_address_type;
 464   
 465    address addr;
 466    guint32  IPv4;
 467    guint32  port;
 468    struct e_in6_addr IPv6;
 469   
 470   
 471    /* Get type */
 472[+]   ip_address_type = tvb_get_guint8(tvb, offset);
 473   
 474    switch (ip_address_type) {
 475    case ACN_ADDR_NULL:
 476      proto_tree_add_item(tree, hf_acn_ip_address_type, tvb, offset, 1, FALSE);
 477      offset += 1;
 478      break;
 479    case ACN_ADDR_IPV4:
 480      /* Build tree and add type*/
 481      pi = proto_tree_add_text(tree, tvb, offset, 7, "%s", label);
 482      addr_tree = proto_item_add_subtree(pi, ett_acn_address);
 483      proto_tree_add_item(addr_tree, hf_acn_ip_address_type, tvb, offset, 1, FALSE);
 484      offset +=1;
 485
504
Show [ Lines 485 to 504 omitted. ]
 505      proto_tree_add_item(addr_tree, hf_acn_port, tvb, offset, 2, FALSE);
 506      offset += 2;
 507      /* Add Address */
 508      proto_tree_add_item(addr_tree, hf_acn_ipv6, tvb, offset, 16, FALSE);
 509      /* Append port and address to tree item */
 510      tvb_get_ipv6(tvb, offset, &IPv6);
 511      SET_ADDRESS(&addr, AT_IPv6, sizeof(struct e_in6_addr), &IPv6);
 512      proto_item_append_text(pi, " %s, Port %d", address_to_str(&addr), port);
 513      offset += 16;
 514      break;
 515    case ACN_ADDR_IPPORT:
 516      /* Build tree and add type*/
 517      pi = proto_tree_add_text(tree, tvb, offset, 3, "%s", label);
 518      addr_tree = proto_item_add_subtree(pi, ett_acn_address);
 519      proto_tree_add_item(addr_tree, hf_acn_ip_address_type, tvb, offset, 1, FALSE);
 520      offset +=1;
 521      /* Add port */
 522      port = tvb_get_ntohs(tvb, offset);
 523      proto_tree_add_item(addr_tree, hf_acn_port, tvb, offset, 2, FALSE);
 524      /* Append port to tree item */
 525[+]     proto_item_append_text(pi, " %s Port %d", address_to_str(&addr), port);
expand/collapse

address_to_str

(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/to_str.c)expand/collapse
Show more  
 896  gchar*
 897  address_to_str(const address *addr)
 898  {
 899    gchar *str;
 900   
 901    str=ep_alloc(MAX_ADDR_STR_LEN);
 902[+]   address_to_str_buf(addr, str, MAX_ADDR_STR_LEN);
expand/collapse

address_to_str_buf

(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/to_str.c)expand/collapse
Show more  
 907  address_to_str_buf(const address *addr, gchar *buf, int buf_len)
 908  {
 909    const guint8 *addrdata;
 910    const char *addrstr;
 911    struct atalk_ddp_addr ddp_addr;
 912   
 913    if (!buf)
 914      return;
 915   
 916    switch(addr->type){
Show more  
Show more  
Show more  




Change Warning 1804.31901 : Uninitialized Variable

Priority:
State:
Finding:
Owner:
Note: