mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-06 01:45:11 +00:00
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 ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@211234 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -356,7 +356,12 @@ static int local_read(struct ast_channel *chan, const char *cmd, char *data, cha
|
||||
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user