[Asterisk-code-review] chan sip: Check that an iostream exists before accessing. (asterisk[master])

Corey Farrell asteriskteam at digium.com
Thu Jan 11 12:05:24 CST 2018


Corey Farrell has uploaded this change for review. ( https://gerrit.asterisk.org/7932


Change subject: chan_sip: Check that an iostream exists before accessing.
......................................................................

chan_sip: Check that an iostream exists before accessing.

Before getting the file descriptor for an iostream check
that it is present.

ASTERISK-27534

Change-Id: Ie0aa1394007a37c30e337ea1176a6fb3a63bc99c
---
M channels/chan_sip.c
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/32/7932/1

diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index e204f00..e8cc591 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -29450,7 +29450,7 @@
 		return s->fd;
 	}
 	if ((s->type & (AST_TRANSPORT_TCP | AST_TRANSPORT_TLS)) &&
-			s->tcptls_session) {
+			s->tcptls_session && s->tcptls_session->stream) {
 		return ast_iostream_get_fd(s->tcptls_session->stream);
 	}
 	if ((s->type & (AST_TRANSPORT_WS | AST_TRANSPORT_WSS))) {

-- 
To view, visit https://gerrit.asterisk.org/7932
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie0aa1394007a37c30e337ea1176a6fb3a63bc99c
Gerrit-Change-Number: 7932
Gerrit-PatchSet: 1
Gerrit-Owner: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180111/b18273e0/attachment.html>


More information about the asterisk-code-review mailing list