mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-15 08:44:14 +00:00
unqiueid: correct max uniqueid length test
This patch adds null string test prior to checking for a max uniqueid value that was added in r410157. ........ Merged revisions 410368 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410369 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -4728,8 +4728,8 @@ static int action_originate(struct mansession *s, const struct message *m)
|
|||||||
pthread_t th;
|
pthread_t th;
|
||||||
int bridge_early = 0;
|
int bridge_early = 0;
|
||||||
|
|
||||||
if (strlen(assignedids.uniqueid) >= AST_MAX_UNIQUEID ||
|
if ((!ast_strlen_zero(assignedids.uniqueid) && strlen(assignedids.uniqueid) >= AST_MAX_UNIQUEID) ||
|
||||||
strlen(assignedids.uniqueid2) >= AST_MAX_UNIQUEID) {
|
(!ast_strlen_zero(assignedids.uniqueid2) && strlen(assignedids.uniqueid2) >= AST_MAX_UNIQUEID)) {
|
||||||
ast_log(LOG_WARNING, "Uniqueid length exceeds maximum of %d\n", AST_MAX_UNIQUEID);
|
ast_log(LOG_WARNING, "Uniqueid length exceeds maximum of %d\n", AST_MAX_UNIQUEID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -779,7 +779,7 @@ static void ari_channels_handle_originate_with_id(const char *args_endpoint,
|
|||||||
struct ast_assigned_ids assignedids = {args_channel_id, args_other_channel_id};
|
struct ast_assigned_ids assignedids = {args_channel_id, args_other_channel_id};
|
||||||
|
|
||||||
if ((!ast_strlen_zero(assignedids.uniqueid) && strlen(assignedids.uniqueid) >= AST_MAX_UNIQUEID) ||
|
if ((!ast_strlen_zero(assignedids.uniqueid) && strlen(assignedids.uniqueid) >= AST_MAX_UNIQUEID) ||
|
||||||
(!ast_strlen_zero(assignedids.uniqueid) && strlen(assignedids.uniqueid2) >= AST_MAX_UNIQUEID)) {
|
(!ast_strlen_zero(assignedids.uniqueid2) && strlen(assignedids.uniqueid2) >= AST_MAX_UNIQUEID)) {
|
||||||
ast_log(LOG_WARNING, "Uniqueid length exceeds maximum of %d\n", AST_MAX_UNIQUEID);
|
ast_log(LOG_WARNING, "Uniqueid length exceeds maximum of %d\n", AST_MAX_UNIQUEID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user