From 92e48331f21ec49b7c221008c6d9c1527ae4404c Mon Sep 17 00:00:00 2001 From: Jason Parker Date: Tue, 1 May 2012 21:44:13 +0000 Subject: [PATCH] Prevent a potential crash when using manager hooks. Found by me while poking at DPMA-127. ........ Merged revisions 364841 from http://svn.asterisk.org/svn/asterisk/branches/1.8 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@364842 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 4d51c247c1..b6b7ac4593 100644 --- a/main/manager.c +++ b/main/manager.c @@ -4125,7 +4125,7 @@ static int action_originate(struct mansession *s, const struct message *m) ast_parse_allow_disallow(NULL, cap, 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