diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-03-02 22:24:02 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-03-02 22:24:02 +0000 |
commit | be221481753307af187ad0d700068621d2af5a53 (patch) | |
tree | 5ee4e1f8315a5bf19ab84d3873ea2a8c91bded3a | |
parent | 48f1b82348d629eaabc56a064acb095ba2a0d029 (diff) |
prevent crash with some extra checks while doing authentication (bug #3686)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/v1-0@5121 f38db490-d61c-443f-a65b-d21fe96a405b
-rwxr-xr-x | apps/app_voicemail.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index 8f6b18546..0f422d96b 100755 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -3411,15 +3411,20 @@ static int vm_execmain(struct ast_channel *chan, void *data) logretries++; if (!valid) { if (skipuser || logretries >= maxlogins) { - if (ast_streamfile(chan, "vm-incorrect", chan->language)) - break; + if (ast_streamfile(chan, "vm-incorrect", chan->language)) { + ast_log(LOG_WARNING, "Unable to stream incorrect message\n"); + return -1; + } } else { if (useadsi) adsi_login(chan); - if (ast_streamfile(chan, "vm-incorrect-mailbox", chan->language)) - break; + if (ast_streamfile(chan, "vm-incorrect-mailbox", chan->language)) { + 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)) { |