Text   |  XML   |  ReML   |   Visible Warnings:

Unreachable Data Flow  at packet-gsm_a_bssmap.c:3405

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

be_speech_codec

(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-gsm_a_bssmap.c)expand/collapse
Show more  
 3343  be_speech_codec(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 3344  {
 3345          guint32 curr_offset, consumed = 0;
 3346          guint8 codec;
 3347          guint8 number = 0;
 3348          proto_item      *item = NULL;
 3349          proto_tree      *subtree = NULL;
 3350   
 3351          curr_offset = offset;
 3352           
 3353          while (curr_offset-offset < len){
 3354                  number++;
 3355                  consumed=0;
 3356                  item = proto_tree_add_text(tree, tvb, curr_offset, 1, "Speech Codec Element %u",number);
 3357                  subtree = proto_item_add_subtree(item, ett_codec_lst);
 3358                  codec = tvb_get_guint8(tvb,curr_offset)&0x0f;
 3359                  /* FI indicates Full IP */
 3360                  proto_tree_add_item(subtree, hf_gsm_a_bssmap_fi2, tvb, curr_offset, 1, FALSE);
 3361                  /* PI indicates PCMoIP */
 3362                  proto_tree_add_item(subtree, hf_gsm_a_bssmap_pi2, tvb, curr_offset, 1, FALSE);
 3363                  /* PT indicates PCMoTDM */
 3364                  proto_tree_add_item(subtree, hf_gsm_a_bssmap_pt2, tvb, curr_offset, 1, FALSE);
 3365                  /* TF indicates TFO support */
 3366                  proto_tree_add_item(subtree, hf_gsm_a_bssmap_tf2, tvb, curr_offset, 1, FALSE);
 3367                  /* Codec Type */
 3368                  proto_tree_add_item(subtree, hf_gsm_a_bssap_speech_codec, tvb, curr_offset, 1, FALSE);
 3369                  curr_offset++;
 3370                  consumed++;
 3371                  switch(codec){
 3372                          case 3:
 3373                                  /* fall through */
 3374                          case 4:
 3375                                  /* fall through */
 3376                          case 0xb:
 3377                                  /* FR_AMR is coded '011'  
 3378                                   * HR_AMR is coded '100'
 3379                                   * OHR_AMR is coded '1011'
 3380                                   */
 3381                                  proto_tree_add_text(subtree, tvb, curr_offset, 2, "S0 - S15");
 3382                                  curr_offset+=2;
 3383                                  consumed+=2;
 3384                                  break;
 3385                          case 0x9:
 3386                                  /* fall through */
 3387                          case 0xc:
 3388                                  /* fall through */
 3389                          case 0xd:
 3390                                  /* FR_AMR-WB is coded '1001'  
 3391                                   * OFR_AMR-WB is coded '1100'
 3392                                   * OHR_AMR-WB is coded '1101'
 3393                                   */
 3394                                  proto_tree_add_text(subtree, tvb, curr_offset, 1, "S0 - S7");
 3395                                  curr_offset++;
 3396                                  consumed++;
 3397                                  break;
 3398                          default:
 3399                                  break;
 3400                  }        
 3401          }
 3402          proto_item_set_len(item, consumed);
 3403          return(len);
 3404   
 3405          return(len);
 3406  }
Show more  




Change Warning 2390.32317 : Unreachable Data Flow

Priority:
State:
Finding:
Owner:
Note: