Text   |  XML   |  ReML   |   Visible Warnings:

Buffer Overrun  at tvbuff.c:1029

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);
expand/collapse

tvb_get_ntohguid

(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/tvbuff.c)expand/collapse
Show more  
 1476  tvb_get_ntohguid(tvbuff_t *tvb, gint offset, e_guid_t *guid)
 1477  {
 1478          ensure_contiguous(tvb, offset, sizeof(*guid));
 1479          guid->data1 = tvb_get_ntohl(tvb, offset);
 1480          guid->data2 = tvb_get_ntohs(tvb, offset + 4);
 1481          guid->data3 = tvb_get_ntohs(tvb, offset + 6);
 1482[+]         tvb_memcpy(tvb, guid->data4, offset + 8, sizeof guid->data4);
expand/collapse

tvb_memcpy

(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/tvbuff.c)expand/collapse
Show more  
 1009  void*
 1010  tvb_memcpy(tvbuff_t *tvb, void* target, gint offset, size_t length)
 1011  {
 1012          guint   abs_offset, abs_length;
 1013   
 1014          /*
 1015           * XXX - we should eliminate the "length = -1 means 'to the end
 1016           * of the tvbuff'" convention, and use other means to achieve
 1017           * that; this would let us eliminate a bunch of checks for
 1018           * negative lengths in cases where the protocol has a 32-bit
 1019           * length field.
 1020           *
 1021           * Allowing -1 but throwing an assertion on other negative 
 1022           * lengths is a bit more work with the length being a size_t;
 1023           * instead, we check for a length <= 2^31-1.
 1024           */
 1025          DISSECTOR_ASSERT(length <= 0x7FFFFFFF);
 1026          check_offset_length(tvb, offset, (gint) length, &abs_offset, &abs_length);
 1027   
 1028          if (tvb->real_data) {
 1029                  return memcpy(target, tvb->real_data + abs_offset, abs_length);
Show more  
Show more  
Show more  




Change Warning 2715.32058 : Buffer Overrun

Priority:
State:
Finding:
Owner:
Note: