Check for NULL frame, before dereferencing pointer.
(closes issue #15617) Reported by: rain git-svn-id: http://svn.digium.com/svn/asterisk/trunk@211232 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
parent
673ecef518
commit
1a4692a9fa
|
@ -474,7 +474,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