(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-lldp.c) |
| |
| 2098 | | | dissect_profinet_tlv(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 offset, guint16 tlvLen2) |
| 2099 | | | { |
| 2100 | | | guint8 subType; |
| 2101 | | | proto_item *tf = NULL; |
| 2102 | | | guint16 class2_PortStatus; |
| 2103 | | | guint16 class3_PortStatus; |
| 2104 | | | guint32 port_rx_delay_local; |
| 2105 | | | guint32 port_rx_delay_remote; |
| 2106 | | | guint32 port_tx_delay_local; |
| 2107 | | | guint32 port_tx_delay_remote; |
| 2108 | | | guint32 cable_delay_local; |
| 2109 | | | const guint8 *mac_addr = NULL; |
| 2110 | | | e_guid_t * uuid; |
| 2111 | | | guint16 mrrt_PortStatus; |
| 2112 | | | |
| 2113 | | | |
| 2114 | | | |
| 2115 | [+] | | subType = tvb_get_guint8(tvb, offset); |
 |
| 2116 | | | if (tree) |
Event 5:
Taking true branch. tree evaluates to true.
hide
|
|
| 2117 | | | proto_tree_add_uint(tree, hf_profinet_tlv_subtype, tvb, offset, 1, subType); |
| 2118 | | | offset++; |
| 2119 | | | |
| 2120 | | | switch (subType) |
Event 6:
subType evaluates to 4.
hide
|
|
| 2121 | | | { |
| 2122 | | | case 1: |
| 2123 | | | { |
| 2124 | | | port_rx_delay_local = tvb_get_ntohl(tvb, offset); |
| 2125 | | | tf = proto_tree_add_uint(tree, hf_profinet_port_rx_delay_local, tvb, offset, 4, port_rx_delay_local); |
| 2126 | | | if(port_rx_delay_local) { |
| 2127 | | | proto_item_append_text(tf, "ns"); |
| 2128 | | | } else { |
| 2129 | | | proto_item_append_text(tf, " (unknown)"); |
| 2130 | | | } |
| 2131 2166 |  | | [ Lines 2131 to 2166 omitted. ] |
| 2167 | | | { |
| 2168 | | | class2_PortStatus = tvb_get_ntohs(tvb, offset); |
| 2169 | | | proto_tree_add_uint(tree, hf_profinet_class2_port_status, tvb, offset, 2, class2_PortStatus); |
| 2170 | | | offset+=2; |
| 2171 | | | class3_PortStatus = tvb_get_ntohs(tvb, offset); |
| 2172 | | | proto_tree_add_uint(tree, hf_profinet_class3_port_status, tvb, offset, 2, class3_PortStatus); |
| 2173 | | | offset+=2; |
| 2174 | | | break; |
| 2175 | | | } |
| 2176 | | | |
| 2177 | | | case 4: |
| 2178 | | | { |
| 2179 | | | |
| 2180 | | | tvb_get_ntohguid (tvb, offset, (e_guid_t *) &uuid); |
| 2181 | [+] | | proto_tree_add_guid(tree, hf_profinet_mrp_domain_uuid, tvb, offset, 16, (e_guid_t *) &uuid); |
Event 7:
&uuid is passed to proto_tree_add_guid() as the sixth argument. - This points to the buffer that will be overrun later.
hide
|
|
 |
| |