From: Jason Parker Date: Tue, 1 May 2012 21:46:23 +0000 (+0000) Subject: Prevent a potential crash when using manager hooks. X-Git-Tag: 10.4.0-digiumphones-rc1~3^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1c88245692f90d5fff44d166e75520caf56e79ca;p=thirdparty%2Fasterisk.git 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 ........ Merged revisions 364842 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@364843 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/main/manager.c b/main/manager.c index 172b47c358..d5c95bac33 100644 --- a/main/manager.c +++ b/main/manager.c @@ -4086,7 +4086,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) { /* To run the System application (or anything else that goes to * shell), you must have the additional System privilege */ if (!(s->session->writeperm & EVENT_FLAG_SYSTEM)