summaryrefslogtreecommitdiff
path: root/pbx/pbx_ael.c
diff options
context:
space:
mode:
authorMark Spencer <markster@digium.com>2005-08-03 02:26:19 +0000
committerMark Spencer <markster@digium.com>2005-08-03 02:26:19 +0000
commitd5a51058ccd7074559600878b7f74393efe9e794 (patch)
tree1b59ca1daa6f73de43c1d9c9ec9fb626517a05d7 /pbx/pbx_ael.c
parent2d108b88267bdd5bba47046d223b0a128c3787f8 (diff)
Fix AEL max character bug (bug #4837)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6259 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'pbx/pbx_ael.c')
-rwxr-xr-xpbx/pbx_ael.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pbx/pbx_ael.c b/pbx/pbx_ael.c
index eedc89369..585b1e7b5 100755
--- a/pbx/pbx_ael.c
+++ b/pbx/pbx_ael.c
@@ -1149,7 +1149,7 @@ static int ast_ael_compile(struct ast_context **local_contexts, const char *file
buf[0] = 0;
bufsiz = 4096;
while(!feof(f)) {
- if (strlen(buf) - bufsiz < 2048) {
+ if (bufsiz - strlen(buf) < 2048) {
bufsiz += 4096;
tbuf = realloc(buf, bufsiz);
if (tbuf) {