Text   |  XML   |  ReML   |   Visible Warnings:

Unreachable Control Flow  at packet-tcap.c:1472

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

dissect_tcap

(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-tcap.c)expand/collapse
Show more  
 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          /* Check if ANSI TCAP and call the ANSI TCAP dissector if that's the case  
 1448           * PackageType ::= CHOICE { unidirectional                      [PRIVATE 1] IMPLICIT UniTransactionPDU,
 1449           *                                               queryWithPerm                          [PRIVATE 2] IMPLICIT TransactionPDU,
 1450           *                                               queryWithoutPerm                       [PRIVATE 3] IMPLICIT TransactionPDU,
 1451           *                                               response                                       [PRIVATE 4] IMPLICIT TransactionPDU,
 1452           *                                               conversationWithPerm           [PRIVATE 5] IMPLICIT TransactionPDU,
 1453           *                                               conversationWithoutPerm        [PRIVATE 6] IMPLICIT TransactionPDU,
 1454           *                                               abort                                          [PRIVATE 22] IMPLICIT Abort  
 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;
 1473                  default:
 1474                          return;
 1475                  }
 1476          }
 1477   
 1478          /* ITU TCAP */
 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      /* create display subtree for the protocol */
 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                  /* If the current message is TCAP only,
 1510                   * save the Application Context Name for the next messages 
 1511                   */
 1512                  if ( p_tcap_context && cur_oid && !p_tcap_context->oid_present ) {
 1513                          /* Save the application context and the sub dissector */
 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                          /* Callback fonction for the upper layer */
 1523                          (p_tcap_context->callback)(tvb, pinfo, tcap_stat_tree, p_tcap_context);
 1524                  }
 1525          }
 1526  }
Show more  




Change Warning 1240.31895 : Unreachable Control Flow

Priority:
State:
Finding:
Owner:
Note: