[asterisk-commits] jpeeler: trunk r120174 - in /trunk: ./ main/config.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jun 3 17:17:08 CDT 2008


Author: jpeeler
Date: Tue Jun  3 17:17:07 2008
New Revision: 120174

URL: http://svn.digium.com/view/asterisk?view=rev&rev=120174
Log:
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.

........

Modified:
    trunk/   (props changed)
    trunk/main/config.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/main/config.c
URL: http://svn.digium.com/view/asterisk/trunk/main/config.c?view=diff&rev=120174&r1=120173&r2=120174
==============================================================================
--- trunk/main/config.c (original)
+++ trunk/main/config.c Tue Jun  3 17:17:07 2008
@@ -1128,7 +1128,11 @@
 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;




More information about the asterisk-commits mailing list