Text   |  XML   |  ReML   |   Visible Warnings:

Buffer Overrun  at to_str.c:996

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

dissect_profinet_tlv

(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-lldp.c)expand/collapse
Show more  
 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          /* Get subtype */
 2115[+]         subType = tvb_get_guint8(tvb, offset);
 2116          if (tree)
 2117                  proto_tree_add_uint(tree, hf_profinet_tlv_subtype, tvb, offset, 1, subType);
 2118          offset++;
 2119   
 2120          switch (subType)
 2121          {
 2122          case 1:         /* LLDP_PNIO_DELAY */
 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
Show [ 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          /*case 3:*/     /* XXX - LLDP_PNIO_ALIAS */
 2177          case 4:         /* LLDP_PNIO_MRPPORTSTATUS */
 2178          {
 2179              /* DomainUUID */
 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);
expand/collapse

proto_tree_add_guid

(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/proto.c)expand/collapse
Show more  
 1830  proto_item *
 1831  proto_tree_add_guid(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length,
 1832                  const e_guid_t *value_ptr)
 1833  {
 1834          proto_item              *pi;
 1835          field_info              *new_fi;
 1836          header_field_info       *hfinfo;
 1837   
 1838          if (!tree)
 1839                  return (NULL);
 1840   
 1841          TRY_TO_FAKE_THIS_ITEM(tree, hfindex);
 1842   
 1843          PROTO_REGISTRAR_GET_NTH(hfindex, hfinfo);
 1844          DISSECTOR_ASSERT(hfinfo->type == FT_GUID);
 1845   
 1846          pi = proto_tree_add_pi(tree, hfindex, tvb, start, &length, &new_fi);
 1847[+]         proto_tree_set_guid(new_fi, value_ptr);
expand/collapse

proto_tree_set_guid

(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/proto.c)expand/collapse
Show more  
 1891  proto_tree_set_guid(field_info *fi, const e_guid_t *value_ptr)
 1892  {
 1893          DISSECTOR_ASSERT(value_ptr != NULL);
 1894          col_custom_set_fstr(fi->hfinfo, "%s",
 1895[+]                             guid_to_str(value_ptr));
expand/collapse

guid_to_str

(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/to_str.c)expand/collapse
Show more  
 986  gchar* guid_to_str(const e_guid_t *guid) {
 987    gchar *buf;
 988   
 989    buf=ep_alloc(GUID_STR_LEN);
 990[+]   return guid_to_str_buf(guid, buf, GUID_STR_LEN);
expand/collapse

guid_to_str_buf

(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/to_str.c)expand/collapse
Show more  
 993  gchar* guid_to_str_buf(const e_guid_t *guid, gchar *buf, int buf_len) {
 994    g_snprintf(buf, buf_len, "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
 995            guid->data1, guid->data2, guid->data3,
 996            guid->data4[0], guid->data4[1], guid->data4[2], guid->data4[3], guid->data4[4], guid->data4[5], guid->data4[6], guid->data4[7]);
Show more  
Show more  
Show more  
Show more  
Show more  




Change Warning 2716.32059 : Buffer Overrun

Because they are very similar, this warning shares annotations with 7 other warnings.   show all

Priority:
State:
Finding:
Owner:
Note: