mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 20:20:07 +00:00
Fix a possible crash in IMAP voicemail.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@80750 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -4421,7 +4421,7 @@ static int play_message(struct ast_channel *chan, struct ast_vm_user *vmu, struc
|
||||
mail_fetchstructure (vms->mailstream,vms->msgArray[vms->curmsg],&body);
|
||||
|
||||
/* We have the body, now we extract the file name of the first attachment. */
|
||||
if (body->nested.part->next && body->nested.part->next->body.parameter->value) {
|
||||
if (body->nested.part && body->nested.part->next && body->nested.part->next->body.parameter->value) {
|
||||
attachedfilefmt = ast_strdupa(body->nested.part->next->body.parameter->value);
|
||||
} else {
|
||||
ast_log(LOG_ERROR, "There is no file attached to this IMAP message.\n");
|
||||
|
Reference in New Issue
Block a user