diff options
author | jpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-06-03 22:15:33 +0000 |
---|---|---|
committer | jpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-06-03 22:15:33 +0000 |
commit | 577046f960cb57825db09e1f62cb0a89557ef71a (patch) | |
tree | 7a08079cdb66cf04f4217a540ca8f959c21b9572 /main | |
parent | 0980c35f805a070d635bbe9f537c148da6aea64d (diff) |
(closes issue #11594)
Reported by: yem
Tested by: yem
This change decreases the buffer size allocated on the stack substantially in config_text_file_load when LOW_MEMORY is turned on. This change combined with the fix from revision 117462 (making mkintf not copy the zt_chan_conf structure) was enough to prevent the crash.
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@120173 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main')
-rw-r--r-- | main/config.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/main/config.c b/main/config.c index 00cc0d836..84ef8ad4e 100644 --- a/main/config.c +++ b/main/config.c @@ -812,7 +812,11 @@ static int process_text_line(struct ast_config *cfg, struct ast_category **cat, static struct ast_config *config_text_file_load(const char *database, const char *table, const char *filename, struct ast_config *cfg, int withcomments) { char fn[256]; +#if defined(LOW_MEMORY) + char buf[512]; +#else char buf[8192]; +#endif char *new_buf, *comment_p, *process_buf; FILE *f; int lineno=0; |