aboutsummaryrefslogtreecommitdiffstats
path: root/main/config.c
diff options
context:
space:
mode:
authorjpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b>2008-06-03 22:18:15 +0000
committerjpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b>2008-06-03 22:18:15 +0000
commit0bd10745c0a7b68e0804f55323d653f422e40d47 (patch)
treed8c273cd6f6029b6f32fa2f8fe21e45ba392733a /main/config.c
parent3fcad05e85659cafbf71fb4f6a7d77f130225d3a (diff)
Merged revisions 120174 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ................ r120174 | jpeeler | 2008-06-03 17:17:07 -0500 (Tue, 03 Jun 2008) | 14 lines 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: http://svn.digium.com/svn/asterisk/branches/1.6.0@120178 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/config.c')
-rw-r--r--main/config.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/main/config.c b/main/config.c
index 76bbfac30..35fa7f3ce 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;