diff options
author | George Joseph <gjoseph@digium.com> | 2018-02-21 10:42:07 -0600 |
---|---|---|
committer | Gerrit Code Review <gerrit2@gerrit.digium.api> | 2018-02-21 10:42:07 -0600 |
commit | 121cbc98cbcc2e37ee86252894c629daf7c1f365 (patch) | |
tree | bc8af5d9e3b7714fce2d09fdac6eff8d55cdfe01 /res | |
parent | 86c75af8600464e6f8aa326ba89006410ac0dd6e (diff) | |
parent | c53d8dcb68751f499df31f0c07c3be7ccd02fa68 (diff) |
Merge "AST-2018-005: Add a check for NULL tdata in ast_sip_failover_request"
Diffstat (limited to 'res')
-rw-r--r-- | res/res_pjsip.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/res/res_pjsip.c b/res/res_pjsip.c index 7b59035c2..79e6cc20b 100644 --- a/res/res_pjsip.c +++ b/res/res_pjsip.c @@ -4173,7 +4173,8 @@ int ast_sip_failover_request(pjsip_tx_data *tdata) { pjsip_via_hdr *via; - if (!tdata->dest_info.addr.count || (tdata->dest_info.cur_addr == tdata->dest_info.addr.count - 1)) { + if (!tdata || !tdata->dest_info.addr.count + || (tdata->dest_info.cur_addr == tdata->dest_info.addr.count - 1)) { /* No more addresses to try */ return 0; } |