[asterisk-commits] jpeeler: branch 1.4 r120173 - /branches/1.4/main/config.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Jun 3 17:15:34 CDT 2008
Author: jpeeler
Date: Tue Jun 3 17:15:33 2008
New Revision: 120173
URL: http://svn.digium.com/view/asterisk?view=rev&rev=120173
Log:
(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.
Modified:
branches/1.4/main/config.c
Modified: branches/1.4/main/config.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/config.c?view=diff&rev=120173&r1=120172&r2=120173
==============================================================================
--- branches/1.4/main/config.c (original)
+++ branches/1.4/main/config.c Tue Jun 3 17:15:33 2008
@@ -812,7 +812,11 @@
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;
More information about the asterisk-commits
mailing list