[asterisk-commits] russell: trunk r359058 - in /trunk: ./ main/pbx.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Mar 13 19:01:44 CDT 2012
Author: russell
Date: Tue Mar 13 19:01:40 2012
New Revision: 359058
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=359058
Log:
Don't use a buffer after it goes out of scope.
's' is set to 'workspace'. Make sure 'workspace' doesn't go out of scope while
the reference to it via 's' is still used.
........
Merged revisions 359056 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 359057 from http://svn.asterisk.org/svn/asterisk/branches/10
Modified:
trunk/ (props changed)
trunk/main/pbx.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-10-merged' - no diff available.
Modified: trunk/main/pbx.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/pbx.c?view=diff&rev=359058&r1=359057&r2=359058
==============================================================================
--- trunk/main/pbx.c (original)
+++ trunk/main/pbx.c Tue Mar 13 19:01:40 2012
@@ -3257,6 +3257,7 @@
int offset, length;
int i, need_substring;
struct varshead *places[2] = { headp, &globals }; /* list of places where we may look */
+ char workspace[20];
if (c) {
ast_channel_lock(c);
@@ -3352,7 +3353,6 @@
} else if (!strcmp(var, "ASTLOGDIR")) {
s = ast_config_AST_LOG_DIR;
} else if (!strcmp(var, "ENTITYID")) {
- char workspace[20];
ast_eid_to_str(workspace, sizeof(workspace), &ast_eid_default);
s = workspace;
}
More information about the asterisk-commits
mailing list