[Asterisk-code-review] channel.c: Fix NewCallerid AMI event not been sent on Caller... (asterisk[11])
Richard Mudgett
asteriskteam at digium.com
Mon Sep 28 12:18:16 CDT 2015
Richard Mudgett has posted comments on this change.
Change subject: channel.c: Fix NewCallerid AMI event not been sent on Caller ID change
......................................................................
Patch Set 2: Code-Review-1
(1 comment)
You are right about this only affecting v11 (and v1.8 which is EOL)
https://gerrit.asterisk.org/#/c/1334/2/main/channel.c
File main/channel.c:
Line 7402: old_number = S_COR(ast_channel_caller(chan)->id.number.valid,
: ast_strdupa(ast_channel_caller(chan)->id.number.str), "");
: old_name = S_COR(ast_channel_caller(chan)->id.name.valid,
: ast_strdupa(ast_channel_caller(chan)->id.name.str), "");
This will crash since ast_strdupa() is not NULL tolerant.
You can rearange the statements like this:
old_number = ast_strdupa(S_COR(ast_channel_caller(chan)->id.number.valid, ast_channel_caller(chan)->id.number.str, ""));
--
To view, visit https://gerrit.asterisk.org/1334
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I2a1ac3a842f0e092c6058d1cd3e35443bece1b36
Gerrit-PatchSet: 2
Gerrit-Project: asterisk
Gerrit-Branch: 11
Gerrit-Owner: Ivan Poddubny <ivan.poddubny at gmail.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Ivan Poddubny <ivan.poddubny at gmail.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-HasComments: Yes
More information about the asterisk-code-review
mailing list