Text   |  XML   |  ReML   |   Visible Warnings:

Cast Alters Value  at packet-smb2.c:4097

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

dissect_smb2_read_response

(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-smb2.c)expand/collapse
Show more  
 4058  dissect_smb2_read_response(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, smb2_info_t *si _U_)
 4059  {
 4060          guint32 length;
 4061   
 4062          switch (si->status) {
 4063          case 0x00000000: break;
 4064          default: return dissect_smb2_error_response(tvb, pinfo, tree, offset, si);
 4065          }
 4066   
 4067          /* buffer code */
 4068          offset = dissect_smb2_buffercode(tree, tvb, offset, NULL);
 4069   
 4070          /* data offset */
 4071          proto_tree_add_item(tree, hf_smb2_data_offset, tvb, offset, 2, TRUE);
 4072          offset += 2;
 4073   
 4074          /* length  might even be 64bits if they are ambitious*/
 4075[+]         length=tvb_get_letohl(tvb, offset);
 4076          proto_tree_add_item(tree, hf_smb2_read_length, tvb, offset, 4, TRUE);
 4077          offset += 4;
 4078   
 4079          /* remaining */
 4080          proto_tree_add_item(tree, hf_smb2_read_remaining, tvb, offset, 4, TRUE);
 4081          offset += 4;
 4082   
 4083          /* reserved */
 4084          offset += 4;
 4085   
 4086          /* data or dcerpc ?
 4087           * If the pidvalid flag is set we assume it is a deferred
 4088           * STATUS_PENDING read and thus a named pipe (==dcerpc)
 4089           */
 4090          if(length && ( (si->tree && si->tree->share_type == SMB2_SHARE_TYPE_IPC)||(si->flags & SMB2_FLAGS_ASYNC_CMD))){
 4091                  offset = dissect_file_data_dcerpc(tvb, pinfo, tree, offset, length, si->top_tree);
 4092                  return offset;
 4093          }
 4094   
 4095          /* data */
 4096          proto_tree_add_item(tree, hf_smb2_read_data, tvb, offset, length, TRUE);
 4097[+][+]         offset += MIN(length,(guint32)tvb_length_remaining(tvb, offset));
Show more  




Change Warning 2986.34157 : Cast Alters Value

Because they are very similar, this warning shares annotations with warning 2986.34158.

Priority:
State:
Finding:
Owner:
Note: