Text   |  XML   |  ReML   |   Visible Warnings:

Unreachable Data Flow  at packet-dcerpc-nt.c:875

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

dissect_nt_hnd

(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-dcerpc-nt.c)expand/collapse
Show more  
 828  dissect_nt_hnd(tvbuff_t *tvb, gint offset, packet_info *pinfo,
 829                        proto_tree *tree, guint8 *drep, int hfindex,
 830                        e_ctx_hnd *pdata, proto_item **pitem,
 831                        gboolean is_open, gboolean is_close, e_hnd_type type)
 832  {
 833          proto_item *item=NULL;
 834          proto_tree *subtree;
 835          e_ctx_hnd hnd;
 836          guint32 open_frame = 0, close_frame = 0;
 837          char *name;
 838          int old_offset = offset;
 839          dcerpc_info *di;
 840   
 841          di=pinfo->private_data;
 842          if(di->conformant_run){
 843                  /*
 844                   * just a run to handle conformant arrays, no scalars to 
 845                   * dissect - and "dissect_ndr_ctx_hnd()" won't return 
 846                   * a handle, so we can't do the hashing stuff in any
 847                   * case 
 848                   */
 849                  return offset;
 850          }
 851   
 852          /* Add to proto tree */
 853   
 854          switch(type){
 855          case HND_TYPE_CTX_HANDLE:
 856                  item = proto_tree_add_text(tree, tvb, offset, sizeof(e_ctx_hnd),
 857                                             "Policy Handle");
 858   
 859                  subtree = proto_item_add_subtree(item, ett_nt_policy_hnd);
 860   
 861                  offset = dissect_ndr_ctx_hnd(tvb, offset, pinfo, subtree, drep,
 862                                               hfindex, &hnd);
 863                  break;
 864          case HND_TYPE_GUID:
 865                  item = proto_tree_add_text(tree, tvb, offset, 16,
 866                                             "GUID handle");
 867   
 868                  subtree = proto_item_add_subtree(item, ett_nt_policy_hnd);
 869   
 870                  hnd.attributes=0;
 871                  offset=dissect_ndr_uuid_t(tvb, offset, pinfo, subtree, drep, hfindex, &hnd.uuid);
 872                  break;
 873          default:
 874                  DISSECTOR_ASSERT_NOT_REACHED();
 875                  return offset;
 876          }
 877   
 878          /*
 879           * Create a new entry for this handle if it's not a null handle
 880           * and no entry already exists, and, in any case, set the
 881           * open, close, first, and last frame information as appropriate.
 882           */
 883          dcerpc_smb_store_pol_pkts(&hnd, pinfo, is_open, is_close);
 884   
 885          /* Insert open/close/name information if known */
 886          if (dcerpc_fetch_polhnd_data(&hnd, &name, NULL, &open_frame,
 887                          &close_frame, pinfo->fd->num)) {
 888   
 889                  if (open_frame) {
 890                          proto_item *item_local;
 891                          item_local=proto_tree_add_uint(
 892                                  subtree, hf_nt_policy_open_frame, tvb,
 893                                  old_offset, sizeof(e_ctx_hnd), open_frame);
 894                          PROTO_ITEM_SET_GENERATED(item_local);
 895                  }
 896                  if (close_frame) {
 897                          proto_item *item_local;
 898                          item_local=proto_tree_add_uint(
 899                                  subtree, hf_nt_policy_close_frame, tvb,
 900                                  old_offset, sizeof(e_ctx_hnd), close_frame);
 901                          PROTO_ITEM_SET_GENERATED(item_local);
 902                  }
 903   
 904                  /*
 905                   * Don't append the handle name if pitem is null; that's
 906                   * an indication that our caller will do so, as we're
 907                   * supplying a pointer to the item so that they can do 
 908                   * so.
 909                   */
 910                  if (name != NULL && pitem == NULL)
 911                          proto_item_append_text(item, ": %s", name);
 912          }
 913   
 914          if (pdata)
 915                  *pdata = hnd;
 916   
 917          if (pitem)
 918                  *pitem = item;
 919   
 920          return offset;
 921  }
Show more  




Change Warning 1681.32806 : Unreachable Data Flow

Priority:
State:
Finding:
Owner:
Note: