Skip to content

Commit

Permalink
also check input parameter for exec_async
Browse files Browse the repository at this point in the history
  • Loading branch information
ionutrazvanionita committed Sep 18, 2015
1 parent eef9fa7 commit aff59f1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/exec/exec.c
Expand Up @@ -510,8 +510,8 @@ int start_async_exec(struct sip_msg* msg, str* command, str* input,
FILE *pin, *pout;
int val;

if (input || outvar) {
pid = __popen3(command->s, input ? &pin : NULL,
if ((input&&input->s&&input->len) || outvar) {
pid = __popen3(command->s, (input&&input->s&&input->len) ? &pin : NULL,
outvar ? &pout : NULL,
NULL);
} else {
Expand Down

0 comments on commit aff59f1

Please sign in to comment.