mirror of
https://github.com/servalproject/serval-dna.git
synced 2025-04-07 11:08:36 +00:00
Found and fixed string termination issue in Asterisk module.
This commit is contained in:
parent
0bae6992c0
commit
3e58d867b7
@ -73,7 +73,8 @@ static char *handle_cli_sdnalookup(int fd, int argc, char *argv[])
|
||||
return RESULT_FAILURE;
|
||||
}
|
||||
|
||||
ast_cli(fd,"%s resolves to %s\n",did,buffer);
|
||||
buffer[len]=0;
|
||||
ast_cli(fd,"%s resolves to %s (len=%d)\n",did,buffer,len);
|
||||
return RESULT_SUCCESS;
|
||||
}
|
||||
|
||||
@ -213,6 +214,7 @@ static int sdnalookup_exec(struct ast_channel *chan, void *data)
|
||||
if (debug) fprintf(stderr,"SNASID=%s\n",sid);
|
||||
}
|
||||
if (len) {
|
||||
buffer[len]=0;
|
||||
pbx_builtin_setvar_helper(chan,"SDNALOCATION",(char*)buffer);
|
||||
if (debug) fprintf(stderr,"SNALOCATION=%s\n",buffer);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user