From: Jason Parker Date: Tue, 1 May 2012 21:37:17 +0000 (+0000) Subject: Prevent a potential crash when using manager hooks. X-Git-Tag: 1.8.13.0-rc1~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=be16f2da64a04c468f89d3d3098342c531eae051;p=thirdparty%2Fasterisk.git 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 --- 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 */