mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 20:20:07 +00:00
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/branches/1.4@67804 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -4839,6 +4839,7 @@ static int close_mailbox(struct vm_state *vms, struct ast_vm_user *vmu)
|
||||
}
|
||||
ast_unlock_path(vms->curdir);
|
||||
#else
|
||||
if (vms->deleted) {
|
||||
for (x=0;x < vmu->maxmsg;x++) {
|
||||
if (vms->deleted[x]) {
|
||||
if(option_debug > 2)
|
||||
@@ -4846,6 +4847,7 @@ static int close_mailbox(struct vm_state *vms, struct ast_vm_user *vmu)
|
||||
IMAP_DELETE(vms->curdir, x, vms->fn, vms);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
done:
|
||||
|
Reference in New Issue
Block a user