Skip to content

Commit

Permalink
dialplan: fix ki_dp_translate() checks for input/output parameters
Browse files Browse the repository at this point in the history
fixes #3447
  • Loading branch information
linuxmaniac committed May 9, 2023
1 parent 84dbcdb commit ab0a2be
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/modules/dialplan/dialplan.c
Expand Up @@ -872,9 +872,12 @@ static int ki_dp_translate(sip_msg_t* msg, int id, str *input_spv, str *output_s
if (!msg)
return -1;

if (input_spv == NULL || input_spv->s == NULL || input_spv->len <= 0 ||
output_spv == NULL || output_spv->s == NULL || output_spv->len <= 0) {
LM_ERR("invalid destination var name for input or output\n");
if (input_spv != NULL && (input_spv->s == NULL || input_spv->len <= 0)) {
LM_ERR("invalid destination var name for input\n");
return -1;
}
if (output_spv != NULL && (output_spv->s == NULL || output_spv->len <= 0)) {
LM_ERR("invalid destination var name for output\n");
return -1;
}

Expand Down

0 comments on commit ab0a2be

Please sign in to comment.