(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-acn.c) |
| |
| 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 | | | |
| 472 | [+] | | ip_address_type = tvb_get_guint8(tvb, offset); |
 |
| 473 | | | |
| 474 | | | switch (ip_address_type) { |
Event 5:
ip_address_type evaluates to 3.
hide
|
|
| 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 | | | |
| 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 |  | | [ Lines 485 to 504 omitted. ] |
| 505 | | | proto_tree_add_item(addr_tree, hf_acn_port, tvb, offset, 2, FALSE); |
| 506 | | | offset += 2; |
| 507 | | | |
| 508 | | | proto_tree_add_item(addr_tree, hf_acn_ipv6, tvb, offset, 16, FALSE); |
| 509 | | | |
| 510 | | | tvb_get_ipv6(tvb, offset, &IPv6); |
| 511 | | | SET_ADDRESS(&addr, AT_IPv6, sizeof(struct e_in6_addr), &IPv6);
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/address.h |
| |
66 | #define SET_ADDRESS(addr, addr_type, addr_len, addr_data) { \ |
67 | (addr)->type = (addr_type); \ |
68 | (addr)->len = (addr_len); \ |
69 | (addr)->data = (addr_data); \ |
70 | } |
| |
|
| 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 | | | |
| 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 | | | |
| 522 | | | port = tvb_get_ntohs(tvb, offset); |
| 523 | | | proto_tree_add_item(addr_tree, hf_acn_port, tvb, offset, 2, FALSE); |
| 524 | | | |
| 525 | [+] | | proto_item_append_text(pi, " %s Port %d", address_to_str(&addr), port); |
Event 6:
&addr is passed to address_to_str().
hide
Event 7:
address_to_str() does not initialize addr. - This may be because of a failure case or other special case for address_to_str().
hide
|
|
 |
| |