[asterisk-commits] tilghman: branch 1.6.2 r211235 - in /branches/1.6.2: ./ apps/app_stack.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sun Aug 9 02:13:39 CDT 2009


Author: tilghman
Date: Sun Aug  9 02:13:35 2009
New Revision: 211235

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=211235
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.2/   (props changed)
    branches/1.6.2/apps/app_stack.c

Propchange: branches/1.6.2/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.2/apps/app_stack.c
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.6.2/apps/app_stack.c?view=diff&rev=211235&r1=211234&r2=211235
==============================================================================
--- branches/1.6.2/apps/app_stack.c (original)
+++ branches/1.6.2/apps/app_stack.c Sun Aug  9 02:13:35 2009
@@ -459,7 +459,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;




More information about the asterisk-commits mailing list