mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-26 22:30:28 +00:00
fix potential segfault in MeetMeAdmin (bug #2681)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-0@4063 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1454,14 +1454,17 @@ static int admin_exec(struct ast_channel *chan, void *data) {
|
|||||||
command = strsep(¶ms, "|");
|
command = strsep(¶ms, "|");
|
||||||
caller = strsep(¶ms, "|");
|
caller = strsep(¶ms, "|");
|
||||||
|
|
||||||
ast_mutex_lock(&conflock);
|
if (!command) {
|
||||||
|
ast_log(LOG_WARNING, "MeetmeAdmin requires a command!\n");
|
||||||
|
ast_mutex_unlock(&conflock);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
cnf = confs;
|
cnf = confs;
|
||||||
while (cnf) {
|
while (cnf) {
|
||||||
if (strcmp(cnf->confno, conf) == 0)
|
if (strcmp(cnf->confno, conf) == 0)
|
||||||
break;
|
break;
|
||||||
cnf = cnf->next;
|
cnf = cnf->next;
|
||||||
}
|
}
|
||||||
ast_mutex_unlock(&conflock);
|
|
||||||
|
|
||||||
if (caller)
|
if (caller)
|
||||||
user = find_user(cnf, caller);
|
user = find_user(cnf, caller);
|
||||||
|
|||||||
Reference in New Issue
Block a user