summaryrefslogtreecommitdiff
path: root/pbx.c
diff options
context:
space:
mode:
authorMartin Pycko <martinp@digium.com>2003-07-01 20:27:18 +0000
committerMartin Pycko <martinp@digium.com>2003-07-01 20:27:18 +0000
commitb66f9e2579dc9ba6368966dcd446b4347d6e376a (patch)
tree9e2bf521c3bc8dcf7a52173e8123e401d5541fbb /pbx.c
parente9cffc55a7b84c6d356283b9167882cc59c950e5 (diff)
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
Diffstat (limited to 'pbx.c')
-rwxr-xr-xpbx.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pbx.c b/pbx.c
index 3be6996cf..37630155b 100755
--- a/pbx.c
+++ b/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);