[asterisk-commits] mmichelson: branch 1.4 r80750 - /branches/1.4/apps/app_voicemail.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Aug 24 10:51:04 CDT 2007


Author: mmichelson
Date: Fri Aug 24 10:51:03 2007
New Revision: 80750

URL: http://svn.digium.com/view/asterisk?view=rev&rev=80750
Log:
Fix a possible crash in IMAP voicemail.


Modified:
    branches/1.4/apps/app_voicemail.c

Modified: branches/1.4/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/apps/app_voicemail.c?view=diff&rev=80750&r1=80749&r2=80750
==============================================================================
--- branches/1.4/apps/app_voicemail.c (original)
+++ branches/1.4/apps/app_voicemail.c Fri Aug 24 10:51:03 2007
@@ -4421,7 +4421,7 @@
 	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");




More information about the asterisk-commits mailing list