Changeset 4486 for pjproject


Ignore:
Timestamp:
Apr 23, 2013 5:36:21 AM (11 years ago)
Author:
bennylp
Message:

Re #1630 (misc): protect against NULL in when dumping call statistic/displaying SRTP policy name which crashed BB10

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_dump.c

    r4300 r4486  
    383383                        pjmedia_srtp_info *srtp_info = 
    384384                                    (pjmedia_srtp_info*) tp_info.spc_info[j].buffer; 
     385                        const char *policy_name = srtp_info->tx_policy.name.ptr; 
     386 
     387                        if (!policy_name) 
     388                            policy_name = ""; 
    385389 
    386390                        len = pj_ansi_snprintf(p, end-p, 
     
    388392                                               indent, 
    389393                                               (srtp_info->active?"Active":"Not active"), 
    390                                                srtp_info->tx_policy.name.ptr); 
     394                                               policy_name); 
    391395                        if (len > 0 && len < end-p) { 
    392396                            p += len; 
Note: See TracChangeset for help on using the changeset viewer.