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

(cherry picked from commit ab0a2be)
  • Loading branch information
linuxmaniac committed May 9, 2023
1 parent 3bab394 commit 5f3ed08
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 5f3ed08

Please sign in to comment.