(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-tcap.c) |
| |
| 1435 | | | dissect_tcap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) |
| 1436 | | | { |
| 1437 | | | proto_item *item=NULL; |
| 1438 | | | proto_tree *tree=NULL; |
| 1439 | | | |
| 1440 | | | struct tcaphash_context_t * p_tcap_context; |
| 1441 | | | dissector_handle_t subdissector_handle; |
| 1442 | | | asn1_ctx_t asn1_ctx; |
| 1443 | | | gint8 class; |
| 1444 | | | gboolean pc; |
| 1445 | | | gint tag; |
| 1446 | | | |
| 1447 | | | |
| 1448 | | | |
| 1449 | | | |
| 1450 | | | |
| 1451 | | | |
| 1452 | | | |
| 1453 | | | |
| 1454 | | | |
| 1455 | | | |
| 1456 | | | |
| 1457 | | | |
| 1458 | | | |
| 1459 | | | get_ber_identifier(tvb, 0, &class, &pc, &tag); |
| 1460 | | | |
| 1461 | | | if(class == BER_CLASS_PRI){ |
| 1462 | | | switch(tag){ |
| 1463 | | | case 1: |
| 1464 | | | case 2: |
| 1465 | | | case 3: |
| 1466 | | | case 4: |
| 1467 | | | case 5: |
| 1468 | | | case 6: |
| 1469 | | | case 22: |
| 1470 | | | call_dissector(ansi_tcap_handle, tvb, pinfo, parent_tree); |
| 1471 | | | return; |
| 1472 | | | break; |
Unreachable Control Flow
The highlighted code will not execute under any circumstances. This may be because of: |
|
| 1473 | | | default: |
| 1474 | | | return; |
| 1475 | | | } |
| 1476 | | | } |
| 1477 | | | |
| 1478 | | | |
| 1479 | | | asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo); |
| 1480 | | | |
| 1481 | | | tcap_top_tree = parent_tree; |
| 1482 | | | tcap_stat_tree = NULL; |
| 1483 | | | |
| 1484 | | | if (check_col(pinfo->cinfo, COL_PROTOCOL)) |
| 1485 | | | { |
| 1486 | | | col_set_str(pinfo->cinfo, COL_PROTOCOL, "TCAP"); |
| 1487 | | | } |
| 1488 | | | |
| 1489 | | | |
| 1490 | | | if(parent_tree){ |
| 1491 | | | item = proto_tree_add_item(parent_tree, proto_tcap, tvb, 0, -1, FALSE); |
| 1492 | | | tree = proto_item_add_subtree(item, ett_tcap); |
| 1493 | | | tcap_stat_tree=tree; |
| 1494 | | | } |
| 1495 | | | cur_oid = NULL; |
| 1496 | | | tcapext_oid = NULL; |
| 1497 | | | raz_tcap_private(&tcap_private); |
| 1498 | | | |
| 1499 | | | pinfo->private_data = &tcap_private; |
| 1500 | | | gp_tcapsrt_info=tcapsrt_razinfo(); |
| 1501 | | | tcap_subdissector_used=FALSE; |
| 1502 | | | gp_tcap_context=NULL; |
| 1503 | | | dissect_tcap_TCMessage(FALSE, tvb, 0, &asn1_ctx, tree, -1); |
| 1504 | | | |
| 1505 | | | if (gtcap_HandleSRT && !tcap_subdissector_used ) { |
| 1506 | | | p_tcap_context=tcapsrt_call_matching(tvb, pinfo, tcap_stat_tree, gp_tcapsrt_info); |
| 1507 | | | tcap_private.context=p_tcap_context; |
| 1508 | | | |
| 1509 | | | |
| 1510 | | | |
| 1511 | | | |
| 1512 | | | if ( p_tcap_context && cur_oid && !p_tcap_context->oid_present ) { |
| 1513 | | | |
| 1514 | | | g_strlcpy(p_tcap_context->oid,cur_oid, LENGTH_OID); |
| 1515 | | | p_tcap_context->oid_present=TRUE; |
| 1516 | | | if ( (subdissector_handle = dissector_get_string_handle(ber_oid_dissector_table, cur_oid)) ) { |
| 1517 | | | p_tcap_context->subdissector_handle=subdissector_handle; |
| 1518 | | | p_tcap_context->subdissector_present=TRUE; |
| 1519 | | | } |
| 1520 | | | } |
| 1521 | | | if (gtcap_HandleSRT && p_tcap_context && p_tcap_context->callback) { |
| 1522 | | | |
| 1523 | | | (p_tcap_context->callback)(tvb, pinfo, tcap_stat_tree, p_tcap_context); |
| 1524 | | | } |
| 1525 | | | } |
| 1526 | | | } |
| |