Text   |  XML   |  ReML   |   Visible Warnings:

Useless Assignment  at packet-isup.c:5123

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

dissect_isup_jurisdiction_parameter

(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-isup.c)expand/collapse
Show more  
 5113  dissect_isup_jurisdiction_parameter(tvbuff_t *parameter_tvb, proto_tree *parameter_tree, proto_item *parameter_item)
 5114  {
 5115    proto_item *address_digits_item;
 5116    proto_tree *address_digits_tree;
 5117    guint8 address_digit_pair=0;
 5118    gint offset=0;
 5119    gint i=0;
 5120    gint length;
 5121    char called_number[MAXDIGITS + 1]="";
 5122   
 5123    offset = 0;
 5124   
 5125    address_digits_item = proto_tree_add_text(parameter_tree, parameter_tvb,
 5126                                              offset, -1,
 5127                                              "Jurisdiction");
 5128    address_digits_tree = proto_item_add_subtree(address_digits_item, ett_isup_address_digits);
 5129   
 5130    while((length = tvb_reported_length_remaining(parameter_tvb, offset)) > 0){
 5131      address_digit_pair = tvb_get_guint8(parameter_tvb, offset);
 5132      proto_tree_add_uint(address_digits_tree, hf_isup_called_party_odd_address_signal_digit, parameter_tvb, offset, 1, address_digit_pair);
 5133      called_number[i++] = number_to_char(address_digit_pair & ISUP_ODD_ADDRESS_SIGNAL_DIGIT_MASK);
 5134      if (i > MAXDIGITS)
 5135        THROW(ReportedBoundsError);
 5136      if ((length - 1) > 0 ){
 5137        proto_tree_add_uint(address_digits_tree, hf_isup_called_party_even_address_signal_digit, parameter_tvb, offset, 1, address_digit_pair);
 5138        called_number[i++] = number_to_char((address_digit_pair & ISUP_EVEN_ADDRESS_SIGNAL_DIGIT_MASK) / 0x10);
 5139        if (i > MAXDIGITS)
 5140          THROW(ReportedBoundsError);
 5141      }
 5142      offset++;
 5143    }
 5144   
 5145    if (tvb_length(parameter_tvb) > 0){
 5146        proto_tree_add_uint(address_digits_tree, hf_isup_called_party_even_address_signal_digit, parameter_tvb, offset - 1, 1, address_digit_pair);
 5147        called_number[i++] = number_to_char((address_digit_pair & ISUP_EVEN_ADDRESS_SIGNAL_DIGIT_MASK) / 0x10);
 5148        if (i > MAXDIGITS)
 5149          THROW(ReportedBoundsError);
 5150    }
 5151    called_number[i++] = '\0';
 5152   
 5153    proto_item_set_text(address_digits_item, "Jurisdiction: %s", called_number);
 5154    proto_item_set_text(parameter_item, "Jurisdiction: %s", called_number);
 5155   
 5156  }/* ------------------------------------------------------------------
Show more  




Change Warning 2704.31270 : Useless Assignment

Priority:
State:
Finding:
Owner:
Note: