mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-16 14:58:25 +00:00
Don't enter the LEN() routines if the variable name was not found
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1149 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
4
pbx.c
4
pbx.c
@@ -888,9 +888,9 @@ static void pbx_substitute_variables_temp(struct ast_channel *c,const char *var,
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!(*ret)) {
|
||||
if (!(*ret) && strcasecmp(var,"LEN(",4) {
|
||||
int len=strlen(var);
|
||||
int len_len=strlen("LEN(");
|
||||
int len_len=4;
|
||||
if (len > (len_len+1) && !strncasecmp(var,"LEN(",len_len) && strchr(var+len_len+2,')')) {
|
||||
char cp3[80];
|
||||
strncpy(cp3, var, sizeof(cp3) - 1);
|
||||
|
||||
Reference in New Issue
Block a user