[asterisk-commits] pbx.c: Crash in handle hint change due to uninitialized values (asterisk[11])
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Aug 19 06:19:34 CDT 2016
Anonymous Coward #1000019 has submitted this change and it was merged.
Change subject: pbx.c: Crash in handle_hint_change due to uninitialized values
......................................................................
pbx.c: Crash in handle_hint_change due to uninitialized values
handle_hint_change calls extension_presence_state_helper, which returns the
presence state subtype and message when a valid state is available. If the
state is invalid then those values are not filled. If they have not been
properly initialized to NULL then when ast_free is later called on them
Asterisk crashes.
This patch initializes the subtype and message to NULL.
ASTERISK-25706 #close
patches:
0008-handle_hint_change-initialize-presence_state.patch
submitted by Tzafrir Cohen (license 5035)
Change-Id: I2eb08c68951b327c42df0798de60484c3a225a50
---
M main/pbx.c
1 file changed, 2 insertions(+), 0 deletions(-)
Approvals:
Richard Mudgett: Looks good to me, but someone else must approve
Anonymous Coward #1000019: Verified
Joshua Colp: Looks good to me, approved
diff --git a/main/pbx.c b/main/pbx.c
index 41094c5..daf2e43 100644
--- a/main/pbx.c
+++ b/main/pbx.c
@@ -6151,6 +6151,8 @@
device_state_notify_callbacks(hint, &hint_app);
+ memset(&presence_state, 0, sizeof(presence_state));
+
state = extension_presence_state_helper(
hint->exten, &presence_state.subtype, &presence_state.message);
--
To view, visit https://gerrit.asterisk.org/3601
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I2eb08c68951b327c42df0798de60484c3a225a50
Gerrit-PatchSet: 2
Gerrit-Project: asterisk
Gerrit-Branch: 11
Gerrit-Owner: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
More information about the asterisk-commits
mailing list