mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-03 19:16:46 +00:00
prevent crash with some extra checks while doing authentication (bug #3686)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-0@5121 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -3411,15 +3411,20 @@ static int vm_execmain(struct ast_channel *chan, void *data)
|
|||||||
logretries++;
|
logretries++;
|
||||||
if (!valid) {
|
if (!valid) {
|
||||||
if (skipuser || logretries >= maxlogins) {
|
if (skipuser || logretries >= maxlogins) {
|
||||||
if (ast_streamfile(chan, "vm-incorrect", chan->language))
|
if (ast_streamfile(chan, "vm-incorrect", chan->language)) {
|
||||||
break;
|
ast_log(LOG_WARNING, "Unable to stream incorrect message\n");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (useadsi)
|
if (useadsi)
|
||||||
adsi_login(chan);
|
adsi_login(chan);
|
||||||
if (ast_streamfile(chan, "vm-incorrect-mailbox", chan->language))
|
if (ast_streamfile(chan, "vm-incorrect-mailbox", chan->language)) {
|
||||||
break;
|
ast_log(LOG_WARNING, "Unable to stream incorrect mailbox message\n");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
ast_waitstream(chan, "");
|
if (ast_waitstream(chan, "")) /* Channel is hung up */
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!valid && (logretries >= maxlogins)) {
|
if (!valid && (logretries >= maxlogins)) {
|
||||||
|
Reference in New Issue
Block a user