Text   |  XML   |  ReML   |   Visible Warnings:

Uninitialized Variable  at packet-smb-browse.c:506

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

dissect_smb_server_type_flags

(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-smb-browse.c)expand/collapse
Show more  
 455  dissect_smb_server_type_flags(tvbuff_t *tvb, int offset, packet_info *pinfo,
 456                                proto_tree *parent_tree, guint8 *drep,  
 457                                gboolean infoflag)
 458  {
 459          proto_tree *tree = NULL;
 460          proto_item *item = NULL;
 461          guint32 flags;
 462          int i;
 463   
 464          if (drep != NULL) {
 465                  /*
 466                   * Called from a DCE RPC protocol dissector, for a
 467                   * protocol where a 32-bit NDR integer contains 
 468                   * an server type mask; extract the server type mask 
 469                   * with an NDR call (but don't put it into the
 470                   * protocol tree, as we can't get a pointer to the 
 471                   * item it puts in, and thus can't put a tree below
 472                   * it with the values of the individual bits).
 473                   */
 474                  offset = dissect_ndr_uint32(
 475[+]                         tvb, offset, pinfo, NULL, drep, hf_server_type, &flags);
 476          } else {
 477                  /*
 478                   * Called from SMB browser or RAP, where the server type
 479                   * mask is just a 4-byte little-endian quantity with no 
 480                   * special NDR alignment requirement; extract it with 
 481                   * "tvb_get_letohl()".
 482                   */
 483                  flags = tvb_get_letohl(tvb, offset);
 484                  offset += 4;
 485          }
 486   
 487          if (parent_tree) {
 488                  item = proto_tree_add_uint(parent_tree, hf_server_type, tvb, offset-4, 4, flags);
 489                  tree = proto_item_add_subtree(item, ett_browse_flags);
 490          }
 491   
 492          if (infoflag) {
 493                  /* Append the type(s) of the system to the COL_INFO line ... */
 494                  if (check_col(pinfo->cinfo, COL_INFO)) {
 495                          for (i = 0; i < 32; i++) {
 496                                  if (flags & (1<<i)) {
 497                                          col_append_fstr(pinfo->cinfo, COL_INFO, ", %s",
 498                                                  val_to_str(i, server_types,
 499                                                  "Unknown server type:%d"));
 500                                  }
 501                          }
 502                  }
 503          }
 504   
 505          proto_tree_add_boolean(tree, hf_server_type_workstation,
 506                  tvb, offset-4, 4, flags);
Show more  




Change Warning 1695.33639 : Uninitialized Variable

Priority:
State:
Finding:
Owner:
Note: