[svn-commits] sgriepentrog: trunk r414217 - in /trunk: ./ funcs/func_strings.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Wed May 21 14:08:44 CDT 2014
Author: sgriepentrog
Date: Wed May 21 14:08:39 2014
New Revision: 414217
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=414217
Log:
pbx.c: prevent potential crash from recursive replace()
Recurisve usage of replace() resulted in corruption of the
temporary string storage and potential crash. By changing
the string to be allocated separtely per instance, this is
eliminated.
ASTERISK-23650 #comment Reported by: Roel van Meer
ASTEIRSK-23650 #close
Review: https://reviewboard.asterisk.org/r/3539/
........
Merged revisions 414214 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 414215 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 414216 from http://svn.asterisk.org/svn/asterisk/branches/12
Modified:
trunk/ (props changed)
trunk/funcs/func_strings.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-12-merged' - no diff available.
Modified: trunk/funcs/func_strings.c
URL: http://svnview.digium.com/svn/asterisk/trunk/funcs/func_strings.c?view=diff&rev=414217&r1=414216&r2=414217
==============================================================================
--- trunk/funcs/func_strings.c (original)
+++ trunk/funcs/func_strings.c Wed May 21 14:08:39 2014
@@ -798,7 +798,7 @@
AST_APP_ARG(replace);
);
char *strptr, *varsubst;
- struct ast_str *str = ast_str_thread_get(&result_buf, 16);
+ RAII_VAR(struct ast_str *, str, ast_str_create(16), ast_free);
char find[256]; /* Only 256 characters possible */
char replace[2] = "";
size_t unused;
More information about the svn-commits
mailing list