aboutsummaryrefslogtreecommitdiffstats
path: root/pbx/pbx_ael.c
diff options
context:
space:
mode:
authormurf <murf@f38db490-d61c-443f-a65b-d21fe96a405b>2008-12-09 16:31:55 +0000
committermurf <murf@f38db490-d61c-443f-a65b-d21fe96a405b>2008-12-09 16:31:55 +0000
commit9e2244e8e495c2c0d099cfcb62065c8c21da18fc (patch)
tree3e38d771d31f4278fbe27519f1491d435386579d /pbx/pbx_ael.c
parent5bc12b2bf3368a5d360f29f9bdfa7aa89f699dac (diff)
(closes issue #14019)
Reported by: ckjohnsonme Patches: 14019.diff uploaded by murf (license 17) Tested by: ckjohnsonme, murf This crash was the result of a few small errors that would combine in 64-bit land to result in a crash. 32-bit land might have seen these combine to mysteriously drop the args to an application call, in certain circumstances. Also, in trying to find this bug, I spotted a situation in the flex input, where, in passing back a 'word' to the parser, it would allocate a buffer larger than necessary. I changed the usage in such situations, so that strdup was not used, but rather, an ast_malloc, followed by ast_copy_string. I removed a field from the pval struct, in u2, that was never getting used, and set in one spot in the code. I believe it was an artifact of a previous fix to make switch cases work invisibly with extens. And, for goto's I removed a '!' from before a strcmp, that has been there since the initial merging of AEL2, that might prevent the proper target of a goto from being found. This was pretty harmless on its own, as it would just louse up a consistency check for users. Many thanks to ckjohnsonme for providing a simplified and complete set of information about the bug, that helped considerably in finding and fixing the problem. Now, to get aelparse up and running again in trunk, and out of its "horribly broken" state, so I can run the regression suite! git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@162013 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'pbx/pbx_ael.c')
-rw-r--r--pbx/pbx_ael.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pbx/pbx_ael.c b/pbx/pbx_ael.c
index d68c7c547..23454dd98 100644
--- a/pbx/pbx_ael.c
+++ b/pbx/pbx_ael.c
@@ -712,7 +712,7 @@ static int extension_matches(pval *here, const char *exten, const char *pattern)
regex_t preg;
/* simple case, they match exactly, the pattern and exten name */
- if( !strcmp(pattern,exten) == 0 )
+ if( strcmp(pattern,exten) == 0 )
return 1;
if ( pattern[0] == '_' ) {
@@ -3267,7 +3267,7 @@ static void gen_prios(struct ael_extension *exten, char *label, pval *statement,
pr->type = AEL_APPCALL;
p->u2.goto_target = get_goto_target(p);
if( p->u2.goto_target ) {
- p->u3.goto_target_in_case = p->u2.goto_target->u2.label_in_case = label_inside_case(p->u2.goto_target);
+ p->u3.goto_target_in_case = label_inside_case(p->u2.goto_target);
}
if (!p->u1.list->next) /* just one */ {