]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
fix potential segfault in MeetMeAdmin (bug #2681)
authorRussell Bryant <russell@russellbryant.com>
Sat, 23 Oct 2004 12:42:16 +0000 (12:42 +0000)
committerRussell Bryant <russell@russellbryant.com>
Sat, 23 Oct 2004 12:42:16 +0000 (12:42 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-0@4063 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_meetme.c

index ef2ff3de919304269a32f0a010429cea364d1580..ba63f554d049889d9e7f15b01f3f9b634c7a7b82 100755 (executable)
@@ -1454,14 +1454,17 @@ static int admin_exec(struct ast_channel *chan, void *data) {
                command = strsep(&params, "|");
                caller = strsep(&params, "|");
                
-               ast_mutex_lock(&conflock);
+               if (!command) {
+                       ast_log(LOG_WARNING, "MeetmeAdmin requires a command!\n");
+                       ast_mutex_unlock(&conflock);
+                       return -1;
+               }
                cnf = confs;
                while (cnf) {
                        if (strcmp(cnf->confno, conf) == 0) 
                                break;
                        cnf = cnf->next;
                }
-               ast_mutex_unlock(&conflock);
                
                if (caller)
                        user = find_user(cnf, caller);