[Asterisk-code-review] AST-2021-006 - res_pjsip_t38.c: Check for session_media on reinvite. (asterisk[17.9])

George Joseph asteriskteam at digium.com
Thu Mar 4 10:28:52 CST 2021


George Joseph has submitted this change. ( https://gerrit.asterisk.org/c/asterisk/+/15566 )

Change subject: AST-2021-006 - res_pjsip_t38.c: Check for session_media on reinvite.
......................................................................

AST-2021-006 - res_pjsip_t38.c: Check for session_media on reinvite.

When Asterisk sends a reinvite negotiating T38 faxing, it's possible a
crash can occur if the response contains a m=image and zero port. The
reinvite callback code now checks session_media to see if it is null or
not before trying to access the udptl variable on it.

ASTERISK-29305

Change-Id: I1dfc51c5fa586e38579ede4bc228edee213ccaa9
(cherry picked from commit 17f177ce06d55b29b0f27868d8348c40c77cba41)
---
M res/res_pjsip_t38.c
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  George Joseph: Looks good to me, approved; Approved for Submit



diff --git a/res/res_pjsip_t38.c b/res/res_pjsip_t38.c
index 63abce5..5d7f68d 100644
--- a/res/res_pjsip_t38.c
+++ b/res/res_pjsip_t38.c
@@ -325,7 +325,7 @@
 		 * If there is a session_media object, but no udptl object available
 		 * then it's assumed the stream was declined.
 		 */
-		if (!session_media->udptl) {
+		if (session_media && !session_media->udptl) {
 			session_media = NULL;
 		}
 

-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/15566
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 17.9
Gerrit-Change-Id: I1dfc51c5fa586e38579ede4bc228edee213ccaa9
Gerrit-Change-Number: 15566
Gerrit-PatchSet: 1
Gerrit-Owner: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Benjamin Keith Ford <bford at digium.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-CC: Friendly Automation
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20210304/21db69c9/attachment.html>


More information about the asterisk-code-review mailing list