-
Notifications
You must be signed in to change notification settings - Fork 269
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #822 from micmac1/ast-iax2-crash
asterisk: add upstream patch against iax2 crash
- Loading branch information
Showing
2 changed files
with
26 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
net/asterisk/patches/190-chan_iax2.c-Avoid-crash-with-IAX2-switch-support.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
From d26a00ef3484f7fa602044e73e31bcefc8ca1917 Mon Sep 17 00:00:00 2001 | ||
From: Sean Bright <[email protected]> | ||
Date: Fri, 7 Jul 2023 15:57:39 -0400 | ||
Subject: [PATCH] chan_iax2.c: Avoid crash with IAX2 switch support. | ||
|
||
A change made in 82cebaa0 did not properly handle the case when a | ||
channel was not provided, triggering a crash. ast_check_hangup(...) | ||
does not protect against NULL pointers. | ||
|
||
Fixes #180 | ||
--- | ||
channels/chan_iax2.c | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
--- a/channels/chan_iax2.c | ||
+++ b/channels/chan_iax2.c | ||
@@ -14323,7 +14323,7 @@ static struct iax2_dpcache *find_cache(s | ||
ast_log(LOG_WARNING, "Timeout waiting for %s exten %s\n", data, exten); | ||
} | ||
|
||
- if (ast_check_hangup(chan)) { | ||
+ if (chan && ast_check_hangup(chan)) { | ||
doabort = 1; | ||
} | ||
|