Text   |  XML   |  ReML   |   Visible Warnings:

Uninitialized Variable  at packet-smb.c:14587

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

dissect_transaction2_response_data

(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-smb.c)expand/collapse
Show more  
 14510  dissect_transaction2_response_data(tvbuff_t *tvb, packet_info *pinfo,
 14511      proto_tree *parent_tree)
 14512  {
 14513          proto_item *item = NULL;
 14514          proto_tree *tree = NULL;
 14515          smb_info_t *si;
 14516          smb_transact2_info_t *t2i;
 14517          int count;
 14518          gboolean trunc;
 14519          int offset = 0;
 14520          guint16 dc;
 14521   
 14522          dc = tvb_reported_length(tvb);
 14523   
 14524          si = (smb_info_t *)pinfo->private_data;
 14525          DISSECTOR_ASSERT(si);
 14526   
 14527          if (si->sip != NULL && si->sip->extra_info_type == SMB_EI_T2I)
 14528                  t2i = si->sip->extra_info;
 14529          else 
 14530                  t2i = NULL;
 14531   
 14532          if(parent_tree){
 14533                  if (t2i != NULL && t2i->subcmd != -1) {
 14534                          item = proto_tree_add_text(parent_tree, tvb, offset, dc,
 14535                                  "%s Data",
 14536                                  val_to_str(t2i->subcmd, trans2_cmd_vals,
 14537                                          "Unknown (0x%02x)"));
 14538                          tree = proto_item_add_subtree(item, ett_smb_transaction_data);
 14539                  } else {
 14540                          item = proto_tree_add_text(parent_tree, tvb, offset, dc,
 14541                                  "Unknown Transaction2 Data");
 14542                  }
 14543          }
 14544   
 14545          if (t2i == NULL) {
 14546                  offset += dc;
 14547                  return offset;
 14548          }
 14549          switch(t2i->subcmd){
 14550          case 0x00:      /*TRANS2_OPEN2*/
 14551                  /* XXX not implemented yet. See SNIA doc */
 14552                  break;
 14553          case 0x01:      /*TRANS2_FIND_FIRST2*/
 14554                  /* returned data */
 14555                  count = si->info_count;
 14556   
 14557          if(count == -1) {
 14558              break;
 14559          }
 14560                  if (count && check_col(pinfo->cinfo, COL_INFO)) {
 14561                          col_append_str(pinfo->cinfo, COL_INFO,
 14562                          ", Files:");
 14563                  }
 14564   
 14565                  while(count--){
 14566                          offset = dissect_ff2_response_data(tvb, pinfo, tree,
 14567                                  offset, &dc, &trunc);
 14568                          if (trunc)
 14569                                  break;
 14570                  }
 14571                  break;
 14572          case 0x02:      /*TRANS2_FIND_NEXT2*/
 14573                  /* returned data */
 14574                  count = si->info_count;
 14575   
 14576          if(count == -1) {
 14577              break;
 14578          }
 14579[+]                 if (count && check_col(pinfo->cinfo, COL_INFO)) {
 14580                          col_append_str(pinfo->cinfo, COL_INFO,
 14581                          ", Files:");
 14582                  }
 14583   
 14584                  while(count--){
 14585                          offset = dissect_ff2_response_data(tvb, pinfo, tree,
 14586[+]                                 offset, &dc, &trunc);
 14587                          if (trunc)
Show more  




Change Warning 2973.34819 : Uninitialized Variable

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

Priority:
State:
Finding:
Owner:
Note: