Text   |  XML   |  ReML   |   Visible Warnings:

Uninitialized Variable  at packet-per.c:2018

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

dissect_per_bit_string

(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-per.c)expand/collapse
Show more  
 1956  dissect_per_bit_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)
 1957  {
 1958          gint val_start, val_length;
 1959          guint32 length;
 1960          header_field_info *hfi;
 1961          tvbuff_t *out_tvb = NULL;
 1962   
 1963          hfi = (hf_index==-1) ? NULL : proto_registrar_get_nth(hf_index);
 1964   
 1965  DEBUG_ENTRY("dissect_per_bit_string");
 1966          /* 15.8 if the length is 0 bytes there will be no encoding */
 1967          if(max_len==0) {
 1968                  return offset;
 1969          }
 1970   
 1971          if (min_len == NO_BOUND) {
 1972                  min_len = 0;
 1973          }
 1974   
 1975          /* 15.9 if length is fixed and less than or equal to sixteen bits*/
 1976          if ((min_len==max_len) && (max_len<=16)) {
 1977                  out_tvb = new_octet_aligned_subset_bits(tvb, offset, actx, min_len);
 1978                  if (hfi) {
 1979                          actx->created_item = proto_tree_add_item(tree, hf_index, out_tvb, 0, -1, FALSE);
 1980                          proto_item_append_text(actx->created_item, " [bit length %u]", max_len);
 1981                  }
 1982                  offset+=min_len;
 1983                  if (value_tvb)
 1984                          *value_tvb = out_tvb;
 1985                  return offset;
 1986          }
 1987   
 1988   
 1989          /* 15.10 if length is fixed and less than to 64kbits*/
 1990          if((min_len==max_len)&&(min_len<65536)){
 1991                  /* (octet-aligned in the ALIGNED variant)  
 1992                   * align to byte 
 1993                   */
 1994                  if (actx->aligned){
 1995                          /* TODO the displayed value will be wrong for the unaligned variant */
 1996                          BYTE_ALIGN_OFFSET(offset);
 1997                  }
 1998                  out_tvb = new_octet_aligned_subset_bits(tvb, offset, actx, min_len);
 1999                  if (hfi) {
 2000                          actx->created_item = proto_tree_add_item(tree, hf_index, out_tvb, 0, -1, FALSE);
 2001                          proto_item_append_text(actx->created_item, " [bit length %u]", max_len);
 2002                  }
 2003                  offset+=min_len;
 2004                  if (value_tvb)
 2005                          *value_tvb = out_tvb;
 2006                  return offset;
 2007          }
 2008   
 2009          /* 15.11 */
 2010          if (max_len != NO_BOUND) {
 2011                  offset=dissect_per_constrained_integer(tvb, offset, actx,
 2012                          tree, hf_per_bit_string_length, min_len, max_len,
 2013                          &length, has_extension);
 2014                          if (!display_internal_per_fields) PROTO_ITEM_SET_HIDDEN(actx->created_item);
 2015          } else {
 2016[+]                 offset=dissect_per_length_determinant(tvb, offset, actx, tree, hf_per_bit_string_length, &length);
 2017          }
 2018          if(length){
Show more  




Change Warning 1309.31996 : Uninitialized Variable

Priority:
State:
Finding:
Owner:
Note: