[asterisk-commits] tilghman: branch 1.6.0 r211233 - in /branches/1.6.0: ./ apps/app_stack.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Sun Aug 9 02:12:12 CDT 2009
Author: tilghman
Date: Sun Aug 9 02:12:08 2009
New Revision: 211233
URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=211233
Log:
Merged revisions 211232 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
........
r211232 | tilghman | 2009-08-09 02:11:22 -0500 (Sun, 09 Aug 2009) | 4 lines
Check for NULL frame, before dereferencing pointer.
(closes issue #15617)
Reported by: rain
........
Modified:
branches/1.6.0/ (props changed)
branches/1.6.0/apps/app_stack.c
Propchange: branches/1.6.0/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.
Modified: branches/1.6.0/apps/app_stack.c
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.6.0/apps/app_stack.c?view=diff&rev=211233&r1=211232&r2=211233
==============================================================================
--- branches/1.6.0/apps/app_stack.c (original)
+++ branches/1.6.0/apps/app_stack.c Sun Aug 9 02:12:08 2009
@@ -356,7 +356,12 @@
oldlist = stack_store->data;
AST_LIST_LOCK(oldlist);
- frame = AST_LIST_FIRST(oldlist);
+ if (!(frame = AST_LIST_FIRST(oldlist))) {
+ /* Not within a Gosub routine */
+ AST_LIST_UNLOCK(oldlist);
+ return -1;
+ }
+
AST_LIST_TRAVERSE(&frame->varshead, variables, entries) {
if (!strcmp(data, ast_var_name(variables))) {
const char *tmp = pbx_builtin_getvar_helper(chan, data);
More information about the asterisk-commits
mailing list