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

Jenkins2 asteriskteam at digium.com
Fri Jan 12 08:51:32 CST 2018


Jenkins2 has submitted this change and it was merged. ( https://gerrit.asterisk.org/7933 )

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(-)

Approvals:
  Corey Farrell: Looks good to me, but someone else must approve
  Kevin Harwell: Looks good to me, but someone else must approve
  George Joseph: Looks good to me, approved
  Jenkins2: Approved for Submit



diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 1aa47e2..487849a 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -29256,7 +29256,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/7933
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 15
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie0aa1394007a37c30e337ea1176a6fb3a63bc99c
Gerrit-Change-Number: 7933
Gerrit-PatchSet: 1
Gerrit-Owner: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180112/344839f5/attachment.html>


More information about the asterisk-code-review mailing list