mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-30 18:40:46 +00:00
Check for NULL frame, before dereferencing pointer.
(closes issue #15617) Reported by: rain git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@211232 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -474,7 +474,12 @@ static int local_read(struct ast_channel *chan, const char *cmd, char *data, cha
|
|||||||
|
|
||||||
oldlist = stack_store->data;
|
oldlist = stack_store->data;
|
||||||
AST_LIST_LOCK(oldlist);
|
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) {
|
AST_LIST_TRAVERSE(&frame->varshead, variables, entries) {
|
||||||
if (!strcmp(data, ast_var_name(variables))) {
|
if (!strcmp(data, ast_var_name(variables))) {
|
||||||
const char *tmp;
|
const char *tmp;
|
||||||
|
Reference in New Issue
Block a user