diff options
author | Mark Michelson <mmichelson@digium.com> | 2007-06-06 19:46:41 +0000 |
---|---|---|
committer | Mark Michelson <mmichelson@digium.com> | 2007-06-06 19:46:41 +0000 |
commit | 714e772ad493e7c76acdfb52270955872912bc8a (patch) | |
tree | 3a98155499c7072ea3ef4981c580f2b459122f7d /apps | |
parent | 8d35eeab0bad341f8ddc0c5b22fe2ca36880ea8d (diff) |
Merged revisions 67804 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r67804 | mmichelson | 2007-06-06 14:26:55 -0500 (Wed, 06 Jun 2007) | 10 lines
Fix for Issue 9810. There was a segfault under a specific set of circumstances:
1. VoiceMailMain was configured in the dialplan with an extension as its argument
2. A message was left for this mailbox
3. Tried to call VoiceMailMain but hung up before entering password.
This was fixed by checking that a pointer was non-null prior to trying to dereference it.
(Issue 9810, reported by xmarksthespot, patched by Corydon76 with modifications by me).
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@67808 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps')
-rw-r--r-- | apps/app_voicemail.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index 3361aba1d..667ba8f95 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -5032,11 +5032,13 @@ static int close_mailbox(struct vm_state *vms, struct ast_vm_user *vmu) } ast_unlock_path(vms->curdir); #else - for (x=0;x < vmu->maxmsg;x++) { - if (vms->deleted[x]) { - if(option_debug > 2) - ast_log(LOG_DEBUG,"IMAP delete of %d\n",x); - IMAP_DELETE(vms->curdir, x, vms->fn, vms); + if (vms->deleted) { + for (x=0;x < vmu->maxmsg;x++) { + if (vms->deleted[x]) { + if(option_debug > 2) + ast_log(LOG_DEBUG,"IMAP delete of %d\n",x); + IMAP_DELETE(vms->curdir, x, vms->fn, vms); + } } } #endif |