Changeset 5655


Ignore:
Timestamp:
Sep 20, 2017 5:04:25 AM (7 years ago)
Author:
riza
Message:

Close #2043: Fixed pjnath-test crash due to access to an invalid callback.

Location:
pjproject/trunk/pjnath/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjnath/src/pjnath-test/ice_test.c

    r5534 r5655  
    431431 
    432432    ept = (struct ice_ept*) pj_ice_strans_get_user_data(ice_st); 
     433    if (!ept) 
     434        return; 
     435 
    433436    switch (op) { 
    434437    case PJ_ICE_STRANS_OP_INIT: 
  • pjproject/trunk/pjnath/src/pjnath/ice_strans.c

    r5636 r5655  
    15601560    pj_time_val t; 
    15611561    unsigned msec; 
     1562    pj_ice_strans_cb cb = ice_st->cb; 
    15621563 
    15631564    pj_grp_lock_add_ref(ice_st->grp_lock); 
     
    15671568    msec = PJ_TIME_VAL_MSEC(t); 
    15681569 
    1569     if (ice_st->cb.on_ice_complete) { 
     1570    if (cb.on_ice_complete) { 
    15701571        if (status != PJ_SUCCESS) { 
    15711572            char errmsg[PJ_ERR_MSG_SIZE]; 
     
    16401641 
    16411642        pj_log_push_indent(); 
    1642         (*ice_st->cb.on_ice_complete)(ice_st, PJ_ICE_STRANS_OP_NEGOTIATION, 
    1643                                       status); 
     1643        (*cb.on_ice_complete)(ice_st, PJ_ICE_STRANS_OP_NEGOTIATION, status); 
    16441644        pj_log_pop_indent(); 
    16451645 
Note: See TracChangeset for help on using the changeset viewer.