Text   |  XML   |  ReML   |   Visible Warnings:

Uninitialized Variable  at packet-per.c:887

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

dissect_per_constrained_sequence_of

(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-per.c)expand/collapse
Show more  
 832  dissect_per_constrained_sequence_of(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *parent_tree, int hf_index, gint ett_index, const per_sequence_t *seq, int min_len, int max_len, gboolean has_extension _U_)
 833  {
 834          proto_item *item;
 835          proto_tree *tree;
 836          guint32 old_offset=offset;
 837          guint32 length;
 838          header_field_info *hfi;
 839   
 840  DEBUG_ENTRY("dissect_per_constrained_sequence_of");
 841   
 842          /* 19.4 If there is a PER-visible constraint and an extension marker is present in it,  
 843           * a single bit shall be added to the field-list in a bit-field of length one 
 844           */
 845          if(has_extension){
 846                  gboolean extension_present;
 847                  offset=dissect_per_boolean(tvb, offset, actx, parent_tree, hf_per_extension_present_bit, &extension_present);
 848                  if (!display_internal_per_fields) PROTO_ITEM_SET_HIDDEN(actx->created_item);
 849                  if(extension_present){
 850                          /* 10.9 shall be invoked to add the length determinant as a semi-constrained whole number to the field-list,  
 851                           * followed by the component values 
 852                           * TODO: Handle extension
 853                           */
 854                          proto_tree_add_text(parent_tree, tvb, (offset>>3), 1, "dissect_per_constrained_sequence_of with extension is not handled");
 855                  }
 856          }
 857   
 858          /* 19.5 if min==max and min,max<64k ==> no length determinant */
 859          if((min_len==max_len) && (min_len<65536)){
 860                  length=min_len;
 861                  goto call_sohelper;
 862          }
 863   
 864          /* 19.6 ub>=64k or unset */
 865          if ((max_len >= 65536) || (max_len == NO_BOUND)) {
 866                  /* no constraint, see 10.9.4.2 */
 867[+]                 offset=dissect_per_length_determinant(tvb, offset, actx, parent_tree, hf_per_sequence_of_length, &length);
 868                  goto call_sohelper;
 869          }
 870   
 871          /* constrained whole number for number of elements */
 872          offset=dissect_per_constrained_integer(tvb, offset, actx,
 873                  parent_tree, hf_per_sequence_of_length, min_len, max_len,
 874                  &length, FALSE);
 875          if (!display_internal_per_fields) PROTO_ITEM_SET_HIDDEN(actx->created_item);
 876   
 877  call_sohelper:
 878          hfi = proto_registrar_get_nth(hf_index);
 879          if (IS_FT_UINT(hfi->type)) {
 880                  item = proto_tree_add_uint(parent_tree, hf_index, tvb, offset>>3, 0, length);
 881                  proto_item_append_text(item, (length==1)?" item":" items");
 882          } else {
 883                  item=proto_tree_add_item(parent_tree, hf_index, tvb, offset>>3, 0, FALSE);
 884          }
 885          tree=proto_item_add_subtree(item, ett_index);
 886   
 887          offset=dissect_per_sequence_of_helper(tvb, offset, actx, tree, seq->func, *seq->p_id, length);
Show more  




Change Warning 1311.31931 : Uninitialized Variable

Priority:
State:
Finding:
Owner:
Note: