[Asterisk-code-review] AST-2018-005: Add a check for NULL tdata in ast sip failover... (asterisk[14.7])
George Joseph
asteriskteam at digium.com
Wed Feb 21 10:41:08 CST 2018
George Joseph has submitted this change and it was merged. ( https://gerrit.asterisk.org/8337 )
Change subject: AST-2018-005: Add a check for NULL tdata in ast_sip_failover_request
......................................................................
AST-2018-005: Add a check for NULL tdata in ast_sip_failover_request
It was discovered that there are some corner cases where a pjsip tsx
might have no last_tx so calling ast_sip_failover_request with
a NULL last_tx as its tdata would cause a crash.
ASTERISK-27618
Reported By: Sandro Gauci
Change-Id: Ic2b63f6d4ae617c4c19dcdec2a7a6156b54fd15b
---
M res/res_pjsip.c
1 file changed, 2 insertions(+), 1 deletion(-)
Approvals:
Jenkins2: Verified
George Joseph: Looks good to me, approved; Approved for Submit
diff --git a/res/res_pjsip.c b/res/res_pjsip.c
index 4392677..60d997a 100644
--- a/res/res_pjsip.c
+++ b/res/res_pjsip.c
@@ -3887,7 +3887,8 @@
{
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;
}
--
To view, visit https://gerrit.asterisk.org/8337
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 14.7
Gerrit-MessageType: merged
Gerrit-Change-Id: Ic2b63f6d4ae617c4c19dcdec2a7a6156b54fd15b
Gerrit-Change-Number: 8337
Gerrit-PatchSet: 1
Gerrit-Owner: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180221/904a9064/attachment.html>
More information about the asterisk-code-review
mailing list