[Asterisk-code-review] AST-2018-005: Add a check for NULL tdata in ast sip failover... (asterisk[15])
George Joseph
asteriskteam at digium.com
Wed Feb 21 08:57:29 CST 2018
George Joseph has uploaded this change for review. ( https://gerrit.asterisk.org/8328
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(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/28/8328/1
diff --git a/res/res_pjsip.c b/res/res_pjsip.c
index 62d282b..8789d4d 100644
--- a/res/res_pjsip.c
+++ b/res/res_pjsip.c
@@ -4017,7 +4017,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/8328
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 15
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic2b63f6d4ae617c4c19dcdec2a7a6156b54fd15b
Gerrit-Change-Number: 8328
Gerrit-PatchSet: 1
Gerrit-Owner: George Joseph <gjoseph at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180221/b5c87a6f/attachment-0001.html>
More information about the asterisk-code-review
mailing list