Text   |  XML   |  ReML   |   Visible Warnings:

Uninitialized Variable  at packet-dcerpc-pn-io.c:6047

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

dissect_AlarmUserStructure

(/home/sate/Testcases/c/cve/wireshark-1.2.0/plugins/profinet/packet-dcerpc-pn-io.c)expand/collapse
Show more  
 1839  dissect_AlarmUserStructure(tvbuff_t *tvb, int offset,
 1840          packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep,
 1841          guint16 *body_length, guint16 u16UserStructureIdentifier)
 1842  {
 1843      guint16 u16ChannelNumber;
 1844      guint16 u16ChannelErrorType;
 1845      guint16 u16ExtChannelErrorType;
 1846      guint32 u32ExtChannelAddValue;
 1847      guint16 u16Index;
 1848      guint32 u32RecDataLen;
 1849      pnio_ar_t *ar = NULL;
 1850   
 1851   
 1852      switch(u16UserStructureIdentifier) {
 1853      case(0x8000):   /* ChannelDiagnosisData */
 1854          offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
 1855                          hf_pn_io_channel_number, &u16ChannelNumber);
 1856          offset = dissect_ChannelProperties(tvb, offset, pinfo, tree, item, drep);
 1857          offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
 1858                          hf_pn_io_channel_error_type, &u16ChannelErrorType);
 1859          *body_length -= 6;
 1860          break;
 1861      case(0x8002):   /* ExtChannelDiagnosisData */
 1862          offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
 1863                          hf_pn_io_channel_number, &u16ChannelNumber);
 1864   
 1865          offset = dissect_ChannelProperties(tvb, offset, pinfo, tree, item, drep);
 1866   
 1867          offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
 1868                          hf_pn_io_channel_error_type, &u16ChannelErrorType);
 1869          offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
 1870                          hf_pn_io_ext_channel_error_type, &u16ExtChannelErrorType);
 1871          offset = dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep,
 1872                          hf_pn_io_ext_channel_add_value, &u32ExtChannelAddValue);
 1873          *body_length -= 12;
 1874          break;
 1875      case(0x8100):   /* MaintenanceItem */
 1876[+]         offset = dissect_block(tvb, offset, pinfo, tree, drep, &u16Index, &u32RecDataLen, &ar);
expand/collapse

dissect_block

(/home/sate/Testcases/c/cve/wireshark-1.2.0/plugins/profinet/packet-dcerpc-pn-io.c)expand/collapse
Show more  
 5779  dissect_block(tvbuff_t *tvb, int offset,
 5780          packet_info *pinfo, proto_tree *tree, guint8 *drep, guint16 *u16Index, guint32 *u32RecDataLen, pnio_ar_t **ar)
 5781  {
 5782      guint16 u16BlockType;
 5783      guint16 u16BlockLength;
 5784      guint8 u8BlockVersionHigh;
 5785      guint8 u8BlockVersionLow;
 5786          proto_item *sub_item;
 5787          proto_tree *sub_tree;
 5788          guint32 u32SubStart;
 5789      guint16 u16BodyLength;
 5790          proto_item *header_item;
 5791          proto_tree *header_tree;
 5792   
 5793   
 5794      /* from here, we only have big endian (network byte ordering)!!! */
 5795      drep[0] &= ~0x10;
 5796   
 5797      sub_item = proto_tree_add_item(tree, hf_pn_io_block, tvb, offset, 0, FALSE);
 5798          sub_tree = proto_item_add_subtree(sub_item, ett_pn_io_block);
 5799      u32SubStart = offset;
 5800   
 5801      header_item = proto_tree_add_item(sub_tree, hf_pn_io_block_header, tvb, offset, 6, FALSE);
 5802          header_tree = proto_item_add_subtree(header_item, ett_pn_io_block_header);
 5803   
 5804          offset = dissect_dcerpc_uint16(tvb, offset, pinfo, header_tree, drep,
 5805[+]                         hf_pn_io_block_type, &u16BlockType);
 5806          offset = dissect_dcerpc_uint16(tvb, offset, pinfo, header_tree, drep,
 5807                          hf_pn_io_block_length, &u16BlockLength);
 5808          offset = dissect_dcerpc_uint8(tvb, offset, pinfo, header_tree, drep,
 5809                          hf_pn_io_block_version_high, &u8BlockVersionHigh);
 5810          offset = dissect_dcerpc_uint8(tvb, offset, pinfo, header_tree, drep,
 5811                          hf_pn_io_block_version_low, &u8BlockVersionLow);
 5812   
 5813          proto_item_append_text(header_item, ": Type=%s, Length=%u(+4), Version=%u.%u",
 5814                  val_to_str(u16BlockType, pn_io_block_type, "Unknown (0x%04x)"),
 5815          u16BlockLength, u8BlockVersionHigh, u8BlockVersionLow);
 5816   
 5817          proto_item_set_text(sub_item, "%s",
 5818                  val_to_str(u16BlockType, pn_io_block_type, "Unknown (0x%04x)"));
 5819   
 5820[+]     if (check_col(pinfo->cinfo, COL_INFO))
 5821              col_append_fstr(pinfo->cinfo, COL_INFO, ", %s",
 5822          val_to_str(u16BlockType, pn_io_block_type, "Unknown"));
 5823   
 5824      /* block length is without type and length fields, but with version field */
 5825      /* as it's already dissected, remove it */
 5826      u16BodyLength = u16BlockLength - 2;
 5827      tvb_ensure_bytes_exist(tvb, offset, u16BodyLength);
 5828   
 5829      switch(u16BlockType) {
 5830      case(0x0001):
 5831      case(0x0002):
 5832          dissect_AlarmNotification_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow,
 5833                          u16BodyLength);
 5834          break;
 5835      case(0x0008):
 5836          dissect_IODWriteReqHeader_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow,
 5837                          u16Index, u32RecDataLen, ar);
 5838          break;
 5839      case(0x0009):
 5840
6034
Show [ Lines 5840 to 6034 omitted. ]
 6035      case(0x0230):
 6036          dissect_PDNCDataCheck_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow);
 6037          break;
 6038      case(0x0240):
 6039          dissect_PDInterfaceDataReal_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow);
 6040          break;
 6041      case(0x0400):
 6042          dissect_MultipleBlockHeader_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow,
 6043                          u16BodyLength);
 6044          break;
 6045      case(0x0500):
 6046          dissect_RecordDataReadQuery_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow,
 6047                          *u16Index, u16BodyLength);
Show more  
Show more  




Change Warning 3756.34893 : Uninitialized Variable

Priority:
State:
Finding:
Owner:
Note: