Skip to content
Snippets Groups Projects
  • Mark Michelson's avatar
    92ccffd9
    res_pjsip: Prevent access of NULL channels. · 92ccffd9
    Mark Michelson authored
    It is possible to receive incoming requests or responses after the channel
    on an ast_sip_session has been destroyed and NULLed out. Handlers of these
    sorts of requests or responses need to be prepared for the possibility
    that the channel is NULL or else they could cause a crash.
    
    While several places have been amended to deal with NULL channels, there
    were still a couple of places that needed updating.
    
    res_pjsip_dtmf_info.c: When handling incoming INFO requests, we need to
    return early if there is no channel on the session.
    
    res_pjsip_session.c: When handling a 302 response, we need to stop the
    redirecting attempt if there is no channel on the session.
    
    ASTERISK-25148 #close
    reported by Mark Michelson
    
    Change-Id: Id1a75ffc3d0eaa168b0b28188fb54d6cf9fc47a9
    92ccffd9
    History
    res_pjsip: Prevent access of NULL channels.
    Mark Michelson authored
    It is possible to receive incoming requests or responses after the channel
    on an ast_sip_session has been destroyed and NULLed out. Handlers of these
    sorts of requests or responses need to be prepared for the possibility
    that the channel is NULL or else they could cause a crash.
    
    While several places have been amended to deal with NULL channels, there
    were still a couple of places that needed updating.
    
    res_pjsip_dtmf_info.c: When handling incoming INFO requests, we need to
    return early if there is no channel on the session.
    
    res_pjsip_session.c: When handling a 302 response, we need to stop the
    redirecting attempt if there is no channel on the session.
    
    ASTERISK-25148 #close
    reported by Mark Michelson
    
    Change-Id: Id1a75ffc3d0eaa168b0b28188fb54d6cf9fc47a9