From: Jeff Peeler Date: Tue, 3 Jun 2008 22:17:07 +0000 (+0000) Subject: Merged revisions 120173 via svnmerge from X-Git-Tag: 1.6.2.0-beta1~2087 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5f9bb7ed0291e27b6fc25c7b88dc4efd4e6092eb;p=thirdparty%2Fasterisk.git Merged revisions 120173 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r120173 | jpeeler | 2008-06-03 17:15:33 -0500 (Tue, 03 Jun 2008) | 6 lines (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: https://origsvn.digium.com/svn/asterisk/trunk@120174 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/main/config.c b/main/config.c index 4b035a4a57..550222bc6f 100644 --- a/main/config.c +++ b/main/config.c @@ -1128,7 +1128,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, struct ast_flags flags, const char *suggested_include_file, const char *who_asked) { 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;