[Asterisk-code-review] chan_dahdi.c: crash in chan_dahdi (...asterisk[master])

Joshua Colp asteriskteam at digium.com
Tue Jul 2 08:25:41 CDT 2019


Joshua Colp has submitted this change and it was merged. ( https://gerrit.asterisk.org/c/asterisk/+/11514 )

Change subject: chan_dahdi.c: crash in chan_dahdi
......................................................................

chan_dahdi.c: crash in chan_dahdi

Fixes a crash in chan_dahdi occurring on 32-bit systems. A previous
patch introduced a variable of type unassigned long long which is 64-bits.
Casting it as 'ast_json_int_t' along with JSON type 'I' makes it work
with 32-bit systems.

ASTERISK-28457

Change-Id: I9cef6b5f2d826fc5c93f2f6a1c997c4e3e6c93fe
---
M channels/chan_dahdi.c
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Richard Mudgett: Looks good to me, but someone else must approve
  Matthew Fredrickson: Looks good to me, but someone else must approve
  Joshua Colp: Looks good to me, approved; Approved for Submit



diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c
index f428530..434bd16 100644
--- a/channels/chan_dahdi.c
+++ b/channels/chan_dahdi.c
@@ -1766,8 +1766,8 @@
 
 	ast_assert(dahdi_channel != NULL);
 
-	blob = ast_json_pack("{s: i, s: i, s: s}",
-		"group", group,
+	blob = ast_json_pack("{s: I, s: i, s: s}",
+		"group", (ast_json_int_t)group,
 		"span", span,
 		"channel", dahdi_channel);
 	if (!blob) {

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

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: I9cef6b5f2d826fc5c93f2f6a1c997c4e3e6c93fe
Gerrit-Change-Number: 11514
Gerrit-PatchSet: 1
Gerrit-Owner: Christian Savinovich <csavinovich at digium.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Matthew Fredrickson <creslin at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20190702/3d52fc87/attachment.html>


More information about the asterisk-code-review mailing list