(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-gsm_a_bssmap.c) |
| |
| 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 | | | |
| 3360 | | | proto_tree_add_item(subtree, hf_gsm_a_bssmap_fi2, tvb, curr_offset, 1, FALSE); |
| 3361 | | | |
| 3362 | | | proto_tree_add_item(subtree, hf_gsm_a_bssmap_pi2, tvb, curr_offset, 1, FALSE); |
| 3363 | | | |
| 3364 | | | proto_tree_add_item(subtree, hf_gsm_a_bssmap_pt2, tvb, curr_offset, 1, FALSE); |
| 3365 | | | |
| 3366 | | | proto_tree_add_item(subtree, hf_gsm_a_bssmap_tf2, tvb, curr_offset, 1, FALSE); |
| 3367 | | | |
| 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 | | | |
| 3374 | | | case 4: |
| 3375 | | | |
| 3376 | | | case 0xb: |
| 3377 | | | |
| 3378 | | | |
| 3379 | | | |
| 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 | | | |
| 3387 | | | case 0xc: |
| 3388 | | | |
| 3389 | | | case 0xd: |
| 3390 | | | |
| 3391 | | | |
| 3392 | | | |
| 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); |
Unreachable Data Flow
The highlighted code will not execute under any circumstances. This may be because of: |
|
| 3406 | | | } |
| |