Text   |  XML   |  ReML   |   Visible Warnings:

Uninitialized Variable  at packet-per.c:2141

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

dissect_per_octet_string

(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-per.c)expand/collapse
Show more  
 2085  dissect_per_octet_string(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index, int min_len, int max_len, gboolean has_extension, tvbuff_t **value_tvb)
 2086  {
 2087          gint val_start = 0, val_length;
 2088          guint32 length;
 2089          header_field_info *hfi;
 2090          tvbuff_t *out_tvb = NULL;
 2091   
 2092          hfi = (hf_index==-1) ? NULL : proto_registrar_get_nth(hf_index);
 2093   
 2094  DEBUG_ENTRY("dissect_per_octet_string");
 2095   
 2096          if (has_extension) {  /* 16.3 an extension marker is present */
 2097                  gboolean extension_present;
 2098[+]                 offset = dissect_per_boolean(tvb, offset, actx, tree, hf_per_extension_present_bit, &extension_present);
 2099                  if (!display_internal_per_fields) PROTO_ITEM_SET_HIDDEN(actx->created_item);
 2100                  if (extension_present) max_len = NO_BOUND;  /* skip to 16.8 */
 2101          }
 2102   
 2103          if (min_len == NO_BOUND) {
 2104                  min_len = 0;
 2105          }
 2106          if (max_len==0) {  /* 16.5 if the length is 0 bytes there will be no encoding */
 2107                  val_start = offset>>3;  
 2108                  val_length = 0;
 2109   
 2110          } else if((min_len==max_len)&&(max_len<=2)) {  
 2111                  /* 16.6 if length is fixed and less than or equal to two bytes*/
 2112                  val_start = offset>>3;  
 2113                  val_length = min_len;
 2114                  out_tvb = new_octet_aligned_subset(tvb, offset, actx, val_length);
 2115                  offset+=min_len*8;
 2116   
 2117          } else if ((min_len==max_len)&&(min_len<65536)) {  
 2118                  /* 16.7 if length is fixed and less than to 64k*/
 2119   
 2120                  /* align to byte */
 2121                  if (actx->aligned){
 2122                          BYTE_ALIGN_OFFSET(offset);
 2123                  }
 2124                  val_start = offset>>3;
 2125                  val_length = min_len;
 2126                  out_tvb = new_octet_aligned_subset(tvb, offset, actx, val_length);
 2127                  offset+=min_len*8;
 2128   
 2129          } else {  /* 16.8 */
 2130                  if(max_len>0) {  
 2131                          offset = dissect_per_constrained_integer(tvb, offset, actx, tree,
 2132                                  hf_per_octet_string_length, min_len, max_len, &length, FALSE);
 2133   
 2134                                  if (!display_internal_per_fields)  
 2135                                          PROTO_ITEM_SET_HIDDEN(actx->created_item);
 2136                  } else {
 2137                          offset = dissect_per_length_determinant(tvb, offset, actx, tree,  
 2138[+]                                 hf_per_octet_string_length, &length);
 2139                  }
 2140   
 2141                  if(length){
Show more  




Change Warning 1313.32083 : Uninitialized Variable

Priority:
State:
Finding:
Owner:
Note: