From be16f2da64a04c468f89d3d3098342c531eae051 Mon Sep 17 00:00:00 2001 From: Jason Parker Date: Tue, 1 May 2012 21:37:17 +0000 Subject: [PATCH] Prevent a potential crash when using manager hooks. Found by me while poking at DPMA-127. git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@364841 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- main/manager.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/manager.c b/main/manager.c index 7013e4f82b..68085120a9 100644 --- a/main/manager.c +++ b/main/manager.c @@ -4070,7 +4070,7 @@ static int action_originate(struct mansession *s, const struct message *m) format = 0; ast_parse_allow_disallow(NULL, &format, codecs, 1); } - if (!ast_strlen_zero(app)) { + if (!ast_strlen_zero(app) && s->session) { int bad_appdata = 0; /* To run the System application (or anything else that goes to * shell), you must have the additional System privilege */ -- 2.47.3