Text   |  XML   |  ReML   |   Visible Warnings:

Cast Alters Value  at tvbuff.c:1739

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

dissect_dpnss_LbL_msg

(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-dpnss.c)expand/collapse
Show more  
 1163  dissect_dpnss_LbL_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 1164  {
 1165          proto_item *sic_field_item, *ind_field_item;
 1166          proto_tree *sic_field_tree, *ind_field_tree;
 1167          int offset = 0;
 1168          int tvb_end_offset;
 1169          guint8 octet;    
 1170   
 1171          tvb_end_offset = tvb_length(tvb);
 1172   
 1173[+]         proto_tree_add_item(tree, hf_dpnss_LbL_msg_type, tvb, offset, 1, FALSE);
 1174          octet = tvb_get_guint8(tvb,offset)&0x0f;
 1175          offset++;
 1176[+]         if(check_col(pinfo->cinfo, COL_INFO))
 1177                  col_add_fstr(pinfo->cinfo, COL_INFO, "%s ",
 1178                          val_to_str(octet, dpnss_LbL_msg_short_type_vals, "Unknown (%d)" ));
 1179          if(tree){
 1180                  switch (octet){
 1181                  case DPNSS_LbL_MSG_LLM_C:
 1182                          /* 2.3.1 LINK-by-LINK Message (COMPLETE) - LLM(C)*/
 1183                  case DPNSS_LbL_MSG_LLM_I:
 1184                          /* 2.3.2 LINK-by-LINK Message (INCOMPLETE) - LLM(I) */
 1185                          /* Indication Field */
 1186                          ind_field_item = proto_tree_add_text(tree, tvb, offset, -1, "Indication Field: %s",tvb_format_text(tvb,offset,tvb_length_remaining(tvb, offset)));
 1187                          ind_field_tree = proto_item_add_subtree(ind_field_item, ett_dpnss_ind_field);
 1188[+]                         offset = dissect_dpnss_sup_info_str(tvb, pinfo, ind_field_tree, offset);
expand/collapse

dissect_dpnss_sup_info_str

(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-dpnss.c)expand/collapse
Show more  
 1073  dissect_dpnss_sup_info_str(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, gint offset)
 1074  {
 1075          proto_item *sup_str_item;
 1076          proto_tree *sup_str_tree;
 1077          gint            start_offset, hash_offset, tvb_end_offset, sup_inf_str_end_offset, str_no;
 1078          gint            par_start_offset, par_end_offset, number_of_found_par;
 1079          gint            sup_inf_str_len, par_type_num;  
 1080          guint           sup_str_num;
 1081          guint8          octet;
 1082          gboolean        last_string = FALSE;
 1083          gboolean        has_par;
 1084   
 1085          tvb_end_offset = tvb_length(tvb);
 1086   
 1087          str_no = 1;
 1088          while((offset<tvb_end_offset)&&(last_string == FALSE)){
 1089[+]                 octet = tvb_get_guint8(tvb,offset);
 1090                  if (octet == '*'){
 1091                          /* Supplementary Information String */
 1092                          start_offset = offset;
 1093                          has_par = TRUE;
 1094                          number_of_found_par = 0;
 1095                          /* offset points to start of supplementary information string */
 1096                          offset++;
 1097[+]                         hash_offset = tvb_find_guint8(tvb, offset, -1, '#');
 1098                          sup_str_item = proto_tree_add_text(tree, tvb, start_offset, hash_offset-start_offset+1, "Supplementary Information %u: %s",str_no,tvb_format_text(tvb,start_offset,hash_offset-start_offset+1));
 1099                          sup_str_tree = proto_item_add_subtree(sup_str_item, ett_dpnss_sup_str);
 1100                          /* SUPPLEMENTARY INFORMATION STRING IDENTIFIER
 1101                           * Get the parameter number string and translate it to an index into the dpnns_sup_serv_set.
 1102                           * The number may have a trailing alpha character at the end.
 1103                           */
 1104[+]                         sup_inf_str_end_offset = tvb_find_guint8(tvb, offset, hash_offset-offset, '*');
expand/collapse

tvb_find_guint8

(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/tvbuff.c)expand/collapse
Show more  
 1724  tvb_find_guint8(tvbuff_t *tvb, gint offset, gint maxlength, guint8 needle)
 1725  {
 1726          const guint8    *result;
 1727          guint           abs_offset, junk_length;
 1728          guint           tvbufflen;
 1729          guint           limit;
 1730   
 1731          check_offset_length(tvb, offset, 0, &abs_offset, &junk_length);
 1732   
 1733          /* Only search to end of tvbuff, w/o throwing exception. */
 1734          tvbufflen = tvb_length_remaining(tvb, abs_offset);
 1735          if (maxlength == -1) {
 1736                  /* No maximum length specified; search to end of tvbuff. */
 1737                  limit = tvbufflen;
 1738          }
 1739          else if (tvbufflen < (guint) maxlength) {
Show more  
Show more  
Show more  




Change Warning 2330.33940 : Cast Alters Value

Priority:
State:
Finding:
Owner:
Note: