Due to the recursion used when compiling AEL in gen_prios, all the stack space
was being consumed when parsing some AEL that contained nesting 13 levels deep.
Changing a few large buffers to be heap allocated fixed the crash, although I
did not test how many more levels can now be safely used.
(closes issue #16053)
Reported by: diLLec
Tested by: jpeeler
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@271399
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
#ifdef OLD_RAND_ACTION
struct ael_priority *rand_test, *rand_end, *rand_skip;
#endif
- char buf1[2000];
- char buf2[2000];
+ char *buf1 = malloc(2000);
+ char *buf2 = malloc(2000);
+ char *new_label = malloc(2000);
char *strp, *strp2;
- char new_label[2000];
int default_exists;
int local_control_statement_count;
struct ael_priority *loop_break_save;
break;
}
}
+ free(buf1);
+ free(buf2);
+ free(new_label);
}
void set_priorities(struct ael_extension *exten)