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

Christian Savinovich asteriskteam at digium.com
Mon Jul 1 17:05:01 CDT 2019


Christian Savinovich has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/11512


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



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/12/11512/1

diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c
index 8b70447..1f83f02 100644
--- a/channels/chan_dahdi.c
+++ b/channels/chan_dahdi.c
@@ -1849,8 +1849,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/+/11512
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Change-Id: I9cef6b5f2d826fc5c93f2f6a1c997c4e3e6c93fe
Gerrit-Change-Number: 11512
Gerrit-PatchSet: 1
Gerrit-Owner: Christian Savinovich <csavinovich at digium.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20190701/38054286/attachment.html>


More information about the asterisk-code-review mailing list