(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-ansi_a.c) |
| |
| 8393 | | | elem_plcm_id(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_) |
| 8394 | | | { |
| 8395 | | | guint8 oct; |
| 8396 | | | guint32 curr_offset; |
| 8397 | | | const gchar *str; |
| 8398 | | | |
| 8399 | | | curr_offset = offset; |
| 8400 | | | |
| 8401 | | | oct = tvb_get_guint8(tvb, curr_offset); |
| 8402 | | | |
| 8403 | | | |
| 8404 | | | |
| 8405 | | | |
| 8406 | | | switch ((oct & 0xf0) >> 4) |
| 8407 | | | { |
| 8408 | | | case 0x00: str = "PLCM derived from ESN or MEID"; break; |
| 8409 | | | case 0x01: str = "PLCM specified by the base station"; break; |
| 8410 | | | case 0x02: str = "PLCM derived from IMSI_O_S when IMSI_O is derived from IMSI_M"; break; |
| 8411 | | | case 0x03: str = "PLCM derived from IMSI_O_S when IMSI_O is derived from IMSI_T"; break; |
| 8412 | | | break; |
Unreachable Control Flow
The highlighted code will not execute under any circumstances. This may be because of: |
|
| 8413 | | | default: |
| 8414 | | | str = "Reserved"; |
| 8415 | | | break; |
| 8416 | | | } |
| 8417 | | | |
| 8418 | | | other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8); |
| 8419 | | | proto_tree_add_text(tree, |
| 8420 | | | tvb, curr_offset, 1, |
| 8421 | | | "%s : PLCM_TYPE: %s", |
| 8422 | | | a_bigbuf, |
| 8423 | | | str); |
| 8424 | | | |
| 8425 | | | other_decode_bitfield_value(a_bigbuf, oct, 0x0c, 8); |
| 8426 | | | proto_tree_add_text(tree, |
| 8427 | | | tvb, curr_offset, 1, |
| 8428 | | | "%s : Reserved", |
| 8429 | | | a_bigbuf); |
| 8430 | | | |
| 8431 | | | other_decode_bitfield_value(a_bigbuf, oct, 0x03, 8); |
| 8432 | | | proto_tree_add_text(tree, tvb, curr_offset, 1, |
| 8433 | | | "%s : PLCM_42 (MSB)", |
| 8434 | | | a_bigbuf); |
| 8435 | | | |
| 8436 | | | curr_offset++; |
| 8437 | | | |
| 8438 | | | proto_tree_add_text(tree, tvb, curr_offset, 5, "PLCM_42"); |
| 8439 | | | |
| 8440 | | | curr_offset += 5; |
| 8441 | | | |
| 8442 | | | (len, curr_offset - offset);
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-ansi_a.c |
| |
917 | #define (edc_len, edc_max_len) \ |
918 | if ((edc_len) > (edc_max_len)) \ |
919 | { \ |
920 | proto_tree_add_text(tree, tvb, \ |
921 | curr_offset, (edc_len) - (edc_max_len), " Data"); \ |
922 | curr_offset += ((edc_len) - (edc_max_len)); \ |
923 | } |
| |
|
| 8443 | | | |
| 8444 | | | return(curr_offset - offset); |
| 8445 | | | } |
| |